C++ unknown escape sequences on regex + groups captured by half


I’m trying to use the following regex

(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?:(/(^s?#)+)((?)(^s#)+)?)?((#)S*)?

on C++ like this:

#include <iostream>
#include <string>
#include <regex>

int main() {
    std::string str("rtsp://3333:1232@hellowebsite.com:2222");
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?:(/(^s?#)+)((?)(^s#)+)?)?((#)S*)?");
    std::smatch m;
    std::regex_search(str, m, r);
    std::cout << str << std::endl;
    for(auto v: m) std::cout << v << std::endl;
  }

To match rtsp or http URLs, but this is the output of compilation + running:

main.cpp:7:33: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                ^~
main.cpp:7:35: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                  ^~
main.cpp:7:43: warning: unknown escape sequence 's' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                          ^~
main.cpp:7:46: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                             ^~
main.cpp:7:60: warning: unknown escape sequence 's' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                                           ^~
main.cpp:7:62: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                                             ^~
main.cpp:7:88: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
  ...r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?:(/(^s?#)+)((...
                                                                             ^~
main.cpp:7:92: warning: unknown escape sequence 's' (-Wunknown-escape-sequence)
  ...r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?:(/(^s?#)+)((...
                                                                                 ^~
main.cpp:7:105: warning: unknown escape sequence 's' (-Wunknown-escape-sequence)
  ...s#)+)?)?((#)S*)?");
     ^~
main.cpp:7:118: warning: unknown escape sequence 'S' (-Wunknown-escape-sequence)
  ...S*)?");
     ^~
10 warnings generated.
 ./main
rtsp://3333:1232@hellowebsite.com:2222
rtsp://3333:1232@helloweb
rtsp
3333:1232
helloweb

check here..

First of all, why I’m getting unknown escape sequences? \, s and etc are pretty known.

Most importantly, why do I get these unfinished groups? It works fine on regex online testers.