in reply to Converting vim regex to Perl regex
From your description it sounds like you're using regular expressions to convert from vim-style REs to perl-style REs. What you really need is a parser that groks vim-style REs from which you can output the appropriate perl-style REs.
BTW, \& isn't a nightmare, you need to turn A\&B\&C into (?=A)(?=B)C. Though now that I think about it for more than 2 seconds, I suppose the "consumption" of the string would have to be nailed down. My version always consumes enough of the string to match the last pattern and I can see arguments for consuming the minimum or maximum of any of the patterns.
Anyway, you need a real parser. Some things weren't meant to be grokked by regular expressions :)
|
|---|