Use /a modifier on regexps that contain \d to avoid unintentional unicode matches
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Tracking
()
People
(Reporter: justdave, Unassigned)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
Attachments
(1 file)
This is complicated. Bug Perl 5.14 (which we now require) makes this possible.
All of the good details are on bug 1136137 and you can examine the patch there for what types of things need to be done. I count 213 regexps that use \d from a quick grep. They might not all need to be touched because in many cases we can use re '/a' or similar to cover a bunch of them.
The docs for the modifiers appear to have moved since that bug though. You can now see them here
This is more likely to go in 5.2.2 than 5.2.1 because of timing but I don't have a tracking bug for that one yet.
| Reporter | ||
Comment 1•14 days ago
|
||
Looks like /a also changes \w, \s, and word-boundary semantics, so we should use inline (?a:...) for regex pattern strings that also use those.
Comment 2•14 days ago
|
||
| Reporter | ||
Comment 3•2 days ago
|
||
This needs to land on harmony as well.
Description
•