Skip to content

Commit 91ea4da

Browse files
committed
In regex don't try to match sub-expressions and optimize it.
Should improve performance a bit #3.
1 parent 62119e5 commit 91ea4da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libchecktestdata.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ void checktoken(const command& cmd)
10411041

10421042
else if ( cmd.name()=="REGEX" ) {
10431043
string str = eval(cmd.args[0]).getstr();
1044-
regex regexstr(str,regex::extended);
1044+
regex regexstr(str,regex::extended|regex::nosubs|regex::optimize);
10451045
smatch res;
10461046
string matchstr;
10471047

0 commit comments

Comments
 (0)