mardi 20 novembre 2018

Regex usage C++

I'm trying to replace some existing code from C++11 to C++98. I've the following line of code which doesn't work with the older version of C++, and so I'm trying to replace it.

string line = argv[1];
smatch matches;
regex_search(line, matches, regex(R " (^.* P,([^ ]*) .*) " ));

I know that smatch is used for matches on string objects. Also regex_search returns if a sub-sequence in the target sequence matches the pattern specified. However what does regex(R " (^.* P,([^ ]*) .*) " ) mean in this scenario?

Aucun commentaire:

Enregistrer un commentaire