I need to create a regex that do the matching of 2 chars: & OR |.
The line of code is like this:
boost::regex EXPR( "[0-9][0-9][A-Za-z]" ) ;
If I type any string, I would see if the chars listed above are contained in it.
How is possible to do this?
I wouldn’t write a regular expression to match the characters
&or|.I’d use
std::string::find– http://www.cplusplus.com/reference/string/string/find/