in reply to Re^2: Should I escape all chrs in a regex?
in thread Should I escape all chrs in a regex?

While that might be true what happens if we go to perl 6 and they break backwards compatibility?

The perl5-to-6 migration tools will know how to compensate

Or someone moves the regex over to some new version of PHP or puts it into C#?

perl regular expressions are unique, moving to a different language is not a straight cut/paste operation, so that someone will have to live with the fallout; an extra character is not protection.

I know it's very unlikely to be an issue

As the old sayings go

Its only an issue if you choose to make it an issue by switching languages, or upgrading to incompatible versions ....

but isn't it better to be sure?

The way you make sure is to trust but verify, meaning write a test suite.

  • Comment on Re^3: Should I escape all chrs in a regex?