I had a question, I'm using std::regex with these params :
const std::regex_constants::syntax_option_type grammar = std::regex_constants::ECMAScript;
const std::regex_constants::syntax_option_type optionNonICase =
grammar | std::regex_constants::optimize;
const std::regex_constants::syntax_option_type optionICase =
std::regex_constants::icase | grammar |
std::regex_constants::optimize;
I'm parsing a big file line by line (lines are not very big) and extract some data.
I noticed that exact same code with java.util.regex
is much faster that std::regex
...
Do someone know how to opmtimize regex with STL with ECMA ? Maybe I need to translate to an other grammar like grep, awk ? Otherwise, maybe there is an alternative library to use in c++ ?
Thanks for help