11 Aug
2008
11 Aug
'08
5:22 p.m.
gj_uestc wrote:
Hi all, I got another problem here while trying using boost:regex: does boost:regex support char set substraction?
For example:I give boost:regex an expression"[a-z]-[d-f]".I would like the boost take the second "-" as and substracion. So this expression is supposed to be translated as "[a-c]|[f-z]".I am wonderring whether boost:regex has such substraction symbols?
No, but you can simulate subtraction with lookahead/lookbehind, for example: subtraction: (?=[a-z])[^d-f] Intersection: (?=[a-z])[d-f] HTH, John.