Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

57 lines (56 sloc) 2.049 kB
## Metacharacter tests
. a y dot (.)
. \n n dot (.)
. '' n dot (.)
a\s+f abcdef n whitespace (\s)
ab\s+cdef ab cdef y whitespace (\s)
a\S+f abcdef y not whitespace (\S)
a\S+f ab cdef n not whitespace (\S)
^abc abcdef y start and end of string (^)
^abc abc\ndef y start and end of string (^)
^abc def\nabc n start and end of string (^)
def\n^abc def\nabc n start and end of string (^)
def$ abcdef y start and end of string ($)
def$ abc\ndef y start and end of string ($)
def$ def\nabc n start and end of string ($)
def$\nabc def\nabc n start and end of string (^)
abc\n$ abc\n y end of string ($)
abc$ abc\n y end of string with newline ($)
c\nd abc\ndef y logical newline (\n)
c\nd abc\rdef y logical newline matches \r
c\n+d abc\n\ndef y logical newline quantified
a\n+f abcdef n logical newline (\n)
c\nd abc\n\rdef n logical newline matches \n\r
c\nd abc\r\ndef y logical newline matches \r\n
b\nc abc\ndef n logical newline (\n)
\N a y not logical newline (\N)
a\Nc abc y not logical newline (\N)
\N '' n not logical newline (\N)
c\Nd abc\ndef n not logical newline (\N)
c\Nd abc\rdef n not logical newline (\N)
c\N+d abc\n\ndef n not logical newline (\N)
a\N+f abcdef y not logical newline (\N)
c\Nd abc\n\rdef n not logical newline (\N)
c\Nd abc\r\ndef n not logical newline (\N)
b\N\n abc\ndef y not logical newline (\N)
[a-d]|[b-e] c y alternation (|)
[a-d]|[d-e] c y alternation (|)
[a-b]|[b-e] c y alternation (|)
[a-b]|[d-e] c n alternation (|)
[a-d]+|[b-e]+ bcd y alternation (|)
a\w+f a=[ *f n word character
a\w+f abcdef y word character
a\W+f a&%- f y not word character
a\W+f abcdef n not word character
a\d+f abcdef n digit
ab\d+cdef ab42cdef y digit
a\D+f abcdef y not digit
a\D+f ab0cdef n not digit
\Ba\B a- n not boundary
a\Z a\n y basic \Z + (1)
a\Z a y basic \Z + (2)
a\Z ab n basic \Z - (1)
a\Z a\nb n basic \Z - (2)
a\z a y basic \z +
a\z a\n n basic \z - (1)
a\z a\nb n basic \z - (2)
Jump to Line
Something went wrong with that request. Please try again.