|
| 1 | +## Metacharacter tests |
| 2 | +. a y dot (.) |
| 3 | +. \n y dot (.) |
| 4 | +. '' n dot (.) |
| 5 | +a\s+f abcdef n whitespace (\s) |
| 6 | +ab\s+cdef ab cdef y whitespace (\s) |
| 7 | +a\S+f abcdef y not whitespace (\S) |
| 8 | +a\S+f ab cdef n not whitespace (\S) |
| 9 | +^ abc abcdef y start and end of string (^) |
| 10 | +^ abc abc\ndef y start and end of string (^) |
| 11 | +^ abc def\nabc n start and end of string (^) |
| 12 | +def \n ^ abc def\nabc n start and end of string (^) |
| 13 | +def $ abcdef y start and end of string ($) |
| 14 | +def $ abc\ndef y start and end of string ($) |
| 15 | +def $ def\nabc n start and end of string ($) |
| 16 | +def $ \n abc def\nabc n start and end of string (^) |
| 17 | +abc \n $ abc\n y end of string ($) |
| 18 | +abc $ abc\n y end of string with newline ($) |
| 19 | +c \n d abc\ndef y logical newline (\n) |
| 20 | +c \n d abc\rdef y logical newline matches \r |
| 21 | +c \n+ d abc\n\ndef y logical newline quantified |
| 22 | +a\n+f abcdef n logical newline (\n) |
| 23 | +c \n d abc\n\rdef n logical newline matches \n\r |
| 24 | +c \n d abc\r\ndef y logical newline matches \r\n |
| 25 | +b \n c abc\ndef n logical newline (\n) |
| 26 | +\N a y not logical newline (\N) |
| 27 | +a \N c abc y not logical newline (\N) |
| 28 | +\N '' n not logical newline (\N) |
| 29 | +c \N d abc\ndef n not logical newline (\N) |
| 30 | +c \N d abc\rdef n not logical newline (\N) |
| 31 | +c \N+ d abc\n\ndef n not logical newline (\N) |
| 32 | +a\N+f abcdef y not logical newline (\N) |
| 33 | +c \N d abc\n\rdef n not logical newline (\N) |
| 34 | +c \N d abc\r\ndef n not logical newline (\N) |
| 35 | +b \N \n abc\ndef y not logical newline (\N) |
| 36 | +[a-d] | [b-e] c y alternation (|) |
| 37 | +[a-d] | [d-e] c y alternation (|) |
| 38 | +[a-b] | [b-e] c y alternation (|) |
| 39 | +[a-b] | [d-e] c n alternation (|) |
| 40 | +[a-d]+ | [b-e]+ bcd y alternation (|) |
0 commit comments