mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 22:15:26 +00:00
98bcad25c3
This will allow people to switch their filters to the new syntax. The deprecation warning is now more exhaustive, and the info() warning is kept to ensure that everything proceeds smoothly. The regex v2 has also been fixed to: - Consume all the digits/letters on the right (*) - Have named groups - Be created dynamically with other constants (*) The previous version of v2 could complete the match and leave digits/letters on the right when encountering numbers with the old syntax, hence dropping support too early. We also cannot use a word boundary (\b) because that would prevent matching numbers with trailing dots (e.g. "5."). Bug: T212730 Change-Id: Ibf6ac571f6b5c09149d69a19c38240ce6b024dff
9 lines
314 B
Perl
9 lines
314 B
Perl
/* Old syntax, deprecated */
|
|
ax = 10 & 123x === 291 & Fx = 15 & 10o = 8 & 1o === 1 & 10b = 2 & 101010b = 42
|
|
|
|
&
|
|
|
|
/* New syntax */
|
|
0x1A === 0x1a & 0x1a === 26 & 0xa === 10 & 0b11111111 === 255 & 0o123 === 83 & 0x123 === 291 & 0xF === 15 &
|
|
0o10 === 8 & 0o1 === 1 & 0b101010 === 42 & 0b101010 === 0x2a & 0x2a === 0o52
|