Thread: Regex examples
View Single Post
Old 04-17-2014, 12:33 PM   #334
Alex2110
Junior Member
Alex2110 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2014
Device: none
Thanks for the reply.
I think that your answer will work for the provided target string ("abc$456#fgh}890"), but I'm looking for a general regular expression that will work for any combination of alpha/digits character string as I want to find all matches of these three characters in any string.
In C++:
string s("@@@$%^4$88#");
smatch m;
bool found = regex_search(s, m, regex("[$#}]"));
if (found)
{

}
Alex2110 is offline   Reply With Quote