in reply to Re: Regex::Reverse tricky test cases
in thread Regex::Reverse tricky test cases
Some patterns — notably those with negative lookbehinds, which cannot be variable-length, but also others — work better backwards. Yes, you have to reverse the string to be matched, as well as the regex, and then you have to reverse whatever you captured. Sometimes it's still a win.
|
|---|