
6 Jun
2007
6 Jun
'07
10:45 a.m.
Here is a simplification of my expression: sregex expression = sregex::compile( /* 1 */ "^(" /* 2 */ "c[^\r\n]*(?:\r?\n|\r)" /* 3 */ "(?:" /* 4 */ "(?!c)" /* 5 */ "[^\r\n]*(?:\r?\n|\r)" /* 6 */ ")*" /* 7 */ ")" ); Basically: match lines starting with a "c" and the line that follow, until another line starting with a "c" is found. This gives a "quantifier not expected" exception. Changing line 3 to a normal group solves the problem. Changing lines 2 and 5's groups to normal groups also solves the problem. This expression seems to work fine in PowerGREP. JF