FWIW this is precisely how it works in .NET as well (reverse order of capture and back reference). While it might be surprising, it makes sense with the backward read direction in mind.
I'm not fond of the idea of throwing syntax error if the back reference is to the right of the capture inside a lookbehind. /\1(.)/ and /(.\1)/ are both perfectly valid regexps as well, with the semantic that these back references always match, as their corresponding captures are empty at that point. Yang
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss