Closed OnlineCop closed 10 months ago
Enabling (?xx) and then using a multi-line character class (as in, contains one or more literal newlines) should not match a literal newline in TEST STRING:
(?xx)
/(?xx)abc[\t ]def/gm
Lines 11-12 on https://regex101.com/r/HB1v58/1 contain the text "abc" followed by a newline, followed by "def".
The EXPLANATION on the side also omits mention of the newline; it includes only that the tab should match:
Match a single character present in the list below [\t ] \t matches a tab character (ASCII 9)
Since "extra extended" mode is enabled, only the 2-character \t should be considered, and not the literal newline found within the character class.
\t
In other words, lines 11-12 should not match.
Vivaldi (Chromium) | 6.1.3035.302 (Stable channel) (64-bit) Revision | 773772e7e92bf14ad0c8f85f41e3d133d0a2b876 OS | Windows 10 Version 22H2 (Build 19045.3208) JavaScript | V8 11.4.183.29 User Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Thanks, fixed locally
Bug Description
Enabling
(?xx)
and then using a multi-line character class (as in, contains one or more literal newlines) should not match a literal newline in TEST STRING:Reproduction steps
Lines 11-12 on https://regex101.com/r/HB1v58/1 contain the text "abc" followed by a newline, followed by "def".
The EXPLANATION on the side also omits mention of the newline; it includes only that the tab should match:
Expected Outcome
Since "extra extended" mode is enabled, only the 2-character
\t
should be considered, and not the literal newline found within the character class.In other words, lines 11-12 should not match.
Browser and OS