##   Metacharacter tests
.			a		y	dot (.)
.			\n		y	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 $ \n abc		def\nabc	n	start and end of string (^)
abc \n $		abc\n		y	end of string ($)
abc $			abc\n		n	end of string ($)
<<def			abc-def		y	left word boundary, beginning of word
<<bc			abc-def		n	left word boundary, mid-word
c<<			abc-def		n	left word boundary, end of word
<<abc			abc-def		y	left word boundary, BOS
def<<			abc-def		n	left word boundary, EOS
<<			-------		n	left word boundary, no word chars
>>def			abc-def		n	right word boundary, beginning of word
>>bc			abc-def		n	right word boundary, mid-word
c>>			abc-def		y	right word boundary, end of word
>>abc			abc-def		n	right word boundary, BOS
def>>			abc-def		y	right word boundary, EOS
>>			-------		n	right word boundary, no word chars

c \n d			abc\ndef	y	logical newline (\n)
c \n d			abc\o12def	y	logical newline (\n)
c \n d			abc\o15def	y	logical newline (\n)
c \n+ d			abc\n\ndef	y	logical newline (\n)
a\n+f			abcdef		n	logical newline (\n)
c \n d			abc\o12\o15def	n	logical newline (\n)
c \n d			abc\o15\o12def	y	logical newline (\n)
b \n c			abc\ndef	n	logical newline (\n)
\N			a		y	not logical newline (\N)
a \N c			abc		y	not logical newline (\N)
\N			''		n	not logical newline (\N)
c \N d			abc\ndef	n	not logical newline (\N)
c \N d			abc\o12def	n	not logical newline (\N)
c \N d			abc\o15def	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 \N d			abc\o12\o15def	n	not logical newline (\N)
c \N d			abc\o15\o12def	n	not logical newline (\N)
b \N \n			abc\ndef	y	not logical newline (\N)
\Aabc			Aabc		/reserved/	retired metachars (\A)
\Aabc			abc\ndef	/reserved/	retired metachars (\A)
abc\Z			abcZ		/reserved/	retired metachars (\Z)
abc\Z			abc\ndef	/reserved/	retired metachars (\Z)
abc\z			abcz		/reserved/	retired metachars (\z)
def\z			abc\ndef	/reserved/	retired metachars (\z)
abc # def		abc#def		y	comments (#)
abc # xyz		abc#def		y	comments (#)
abc # def \n \$		abc#def		y	comments (#)
abc \# def		abc#def		y	comments (#)
abc \# xyz		abc#def		n	comments (#)
^ abc \# def $		abc#def		y	comments (#)
^^ abc \n ^^ def	abc\ndef	y	line beginnings and endings (^^)
^^ abc \n ^^ def \n ^^	abc\ndef\n	n	line beginnings and endings (^^)
^^ \n			\n		y	line beginnings and endings (^^)
\n ^^			\n		n	line beginnings and endings (^^)
abc $$ \n def $$	abc\ndef	y	line beginnings and endings ($$)
abc $$ \n def $$ \n $$	abc\ndef\n	n	line beginnings and endings ($$)
$$ \n			\n		y	line beginnings and endings ($$)
\n $$			\n		n	line beginnings and endings ($$)
<[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..d]>+ | <[b..e]>+ ] $	bcd		y	alternation (|)
^ [ <[a..c]>+ | <[b..e]>+ ] $	bcd		y	alternation (|)
^ [ <[a..d]>+ | <[c..e]>+ ] $	bcd		y	alternation (|)
b|			bcd		/rule error/	alternation (|) - null right arg illegal
|b			bcd		y	alternation (|) - null left arg ignored
|			bcd		/Missing term/	alternation (|) - null both args illegal
\|			|		y	alternation (|) - literal must be escaped
|			|		n	alternation (|) - literal must be escaped
<[a..d]> & <[b..e]>	c		y	conjunction (&)
<[a..d]> & <[d..e]>	c		n	conjunction (&)
<[a..b]> & <[b..e]>	c		n	conjunction (&)
<[a..b]> & <[d..e]>	c		n	conjunction (&)
<[a..d]>+ & <[b..e]>+	bcd		y	conjunction (&)
^ [ <[a..d]>+ & <[b..e]>+ ] $	bcd		y	conjunction (&)
<[a..c]>+ & <[b..e]>+	bcd		y	conjunction (&)
<[a..d]>+ & <[c..e]>+	bcd		y	conjunction (&)
b&			bcd		/rule error/	conjunction (&) - null right arg illegal
&b			bcd		/Missing term/	conjunction (&) - null left arg illegal
&			bcd		/Missing term/	conjunction (&) - null both args illegal
\&			&		y	conjunction (&) - literal must be escaped
&			&		n	conjunction (&) - literal must be escaped
a&|b			a&|b		/Missing term/	alternation and conjunction (&|) - parse error
a|&b			a|&b		/Missing term/	alternation and conjunction (|&) - parse error
|d|b			abc		y	leading alternation ignored
 |d|b			abc		y	leading alternation ignored
|d |b			abc		y	leading alternation ignored
 | d | b		abc		y	leading alternation ignored
 b |  | d		abc		n	null pattern invalid
\pabc			pabc		/reserved/	retired metachars (\p)
\p{InConsonant}		a		/reserved/	retired metachars (\p)
\Pabc			Pabc		/reserved/	retired metachars (\P)
\P{InConsonant}		a		/reserved/	retired metachars (\P)
\Labc\E			LabcE		/reserved/	retired metachars (\L...\E)
\LABC\E			abc		/reserved/	retired metachars (\L...\E)
\Uabc\E			UabcE		/reserved/	retired metachars (\U...\E)
\Uabc\E			ABC		/reserved/	retired metachars (\U...\E)
\Qabc\E			QabcE		/reserved/	retired metachars (\Q...\E)
\Qabc d?\E		abc d		/reserved/	retired metachars (\Q...\E)
\Gabc			Gabc		/reserved/	retired metachars (\G)
\1abc			1abc		/reserved/	retired metachars (\1)
^ \s+ $			\x0009\x0020\x00a0\x000a\x000b\x000c\x000d\x0085	y	0-255 whitespace (\s)
^ \h+ $			\x0009\x0020\x00a0	y	0-255 horizontal whitespace (\h)
^ \V+ $			\x0009\x0020\x00a0	y	0-255 horizontal whitespace (\h)
^ \v+ $			\x000a\x000b\x000c\x000d\x0085	y	0-255 vertical whitespace (\v)
^ \H+ $			\x000a\x000b\x000c\x000d\x0085	y	0-255 vertical whitespace (\v)
\h			\x000a\x000b\x000c\x000d\x0085	n	0-255 horizontal whitespace (\h)
\v			\x0009\x0020\x00a0	n	0-255 vertical whitespace (\v)
^ \s+ $			\x1680\x180e\x2000\x2001\x2002\x2003\x2004\x2005\x2006\x2007\x2008\x2008\x2009\x200a\x202f\x205f\x3000\x000a\x000b\x000c\x000d\x0085	y	unicode whitespace (\s)
^ \h+ $			\x1680\x180e\x2000\x2001\x2002\x2003\x2004\x2005\x2006\x2007\x2008\x2008\x2009\x200a\x202f\x205f\x3000	y	unicode whitespace (\h)
^ \V+ $			\x1680\x180e\x2000\x2001\x2002\x2003\x2004\x2005\x2006\x2007\x2008\x2008\x2009\x200a\x202f\x205f\x3000	y	unicode whitespace (\h)
^ \v+ $			\x000a\x000b\x000c\x000d\x0085	y	unicode whitespace (\v)
^ \H+ $			\x000a\x000b\x000c\x000d\x0085	y	unicode whitespace (\v)
\h			\x000a\x000b\x000c\x000d\x0085	n	unicode whitespace (\h)
\v			\x1680\x180e\x2000\x2001\x2002\x2003\x2004\x2005\x2006\x2007\x2008\x2008\x2009\x200a\x202f\x205f\x3000	n	unicode whitespace (\v)
c \t d			abc\tdef	y	horizontal tab (\t)
c \t d			abc\o11def	y	horizontal tab (\t)
c \t d			abc\x09def	y	horizontal tab (\t)
c \t+ d			abc\t\tdef	y	horizontal tab (\t)
a \t+ f			abcdef		n	horizontal tab (\t)
b \t c			abc\tdef	n	horizontal tab (\t)
\T			a		y	not horizontal tab (\T)
a \T c			abc		y	not horizontal tab (\T)
\T			''		n	not horizontal tab (\T)
c \T d			abc\tdef	n	not horizontal tab (\T)
c \T d			abc\o11def	n	not horizontal tab (\T)
c \T d			abc\x09def	n	not horizontal tab (\T)
c \T+ d			abc\t\tdef	n	not horizontal tab (\T)
a \T+ f			abcdef		y	not horizontal tab (\T)
c \r d			abc\rdef	y	return (\r)
c \r d			abc\o15def	y	return (\r)
c \r d			abc\x0ddef	y	return (\r)
c \r+ d			abc\r\rdef	y	return (\r)
a \r+ f			abcdef		n	return (\r)
b \r c			abc\rdef	n	return (\r)
\R			a		y	not return (\R)
a \R c			abc		y	not return (\R)
\R			''		n	not return (\R)
c \R d			abc\rdef	n	not return (\R)
c \R d			abc\o15def	n	not return (\R)
c \R d			abc\x0ddef	n	not return (\R)
c \R+ d			abc\r\rdef	n	not return (\R)
a \R+ f			abcdef		y	not return (\R)
c \f d			abc\fdef	y	formfeed (\f)
c \f d			abc\o14def	y	formfeed (\f)
c \f d			abc\x0cdef	y	formfeed (\f)
c \f+ d			abc\f\fdef	y	formfeed (\f)
a \f+ f			abcdef		n	formfeed (\f)
b \f c			abc\fdef	n	formfeed (\f)
\F			a		y	not formfeed (\F)
a \F c			abc		y	not formfeed (\F)
\F			''		n	not formfeed (\F)
c \F d			abc\fdef	n	not formfeed (\F)
c \F d			abc\o14def	n	not formfeed (\F)
c \F d			abc\x0cdef	n	not formfeed (\F)
c \F+ d			abc\f\fdef	n	not formfeed (\F)
a \F+ f			abcdef		y	not formfeed (\F)
c \e d			abc\edef	y	escape (\e)
c \e d			abc\o33def	y	escape (\e)
c \e d			abc\x1bdef	y	escape (\e)
c \e+ d			abc\e\edef	y	escape (\e)
a \e+ f			abcdef		n	escape (\e)
b \e c			abc\edef	n	escape (\e)
\E			a		y	not escape (\E)
a \E c			abc		y	not escape (\E)
\E			''		n	not escape (\E)
c \E d			abc\edef	n	not escape (\E)
c \E d			abc\o33def	n	not escape (\E)
c \E d			abc\x[1b]def	n	not escape (\E)
c \E+ d			abc\e\edef	n	not escape (\E)
a \E+ f			abcdef		y	not escape (\E)
c \x0021 d		abc!def	y	hex (\x)
c \x0021 d		abc\x[21]def	y	hex (\x)
c \x0021 d		abc\o41def	y	hex (\x)
c \x0021+ d		abc!!def	y	hex (\x)
a \x0021+ f		abcdef		n	hex (\x)
b \x0021 c		abc!def		n	hex (\x)
c \x[0021] d		abc!def	y	hex (\x[])
c \x[0021] d		abc\x[21]def	y	hex (\x[])
c \x[0021] d		abc\o41def	y	hex (\x[])
c \x[0021]+ d		abc!!def	y	hex (\x[])
c \x[21,21] d		abc!!def	y	hex (\x[])
a \x[0021]+ f		abcdef		n	hex (\x[])
b \x[0021] c		abc!def		n	hex (\x[])
\X0021			a		y	not hex (\X)
a \X0021 c		abc		y	not hex (\X)
\X0021			''		n	not hex (\X)
c \X0021 d		abc!def		n	not hex (\X)
c \X0021 d		abc\o41def	n	not hex (\X)
c \X0021 d		abc\x[21]def	n	not hex (\X)
c \X0021+ d		abc!!def	n	not hex (\X)
a \X0021+ f		abcdef		y	not hex (\X)
\X[0021]		a		y	not hex (\X[])
a \X[0021] c		abc		y	not hex (\X[])
\X[0021]		''		n	not hex (\X[])
c \X[0021] d		abc!def		n	not hex (\X[])
c \X[0021] d		abc\o41def	n	not hex (\X[])
c \X[0021] d		abc\x[21]def	n	not hex (\X[])
c \X[0021]+ d		abc!!def	n	not hex (\X[])
a \X[0021]+ f		abcdef		y	not hex (\X[])
c \o041 d		abc!def		y	octal (\o)
c \o41 d		abc\o41def	y	octal (\o)
c \o41+ d		abc!!def	y	octal (\o)
a \o41+ f		abcdef		n	octal (\o)
b \o41 c		abc!def		n	octal (\o)
c \o[041] d		abc!def		y	octal (\o[])
c \o[41] d		abc\o41def	y	octal (\o[])
c \o[41]+ d		abc!!def	y	octal (\o[])
c \o[41,41] d		abc!!def	y	octal (\o[])
a \o[41]+ f		abcdef		n	octal (\o[])
b \o[41] c		abc!def		n	octal (\o[])
\O41			a		y	not octal (\O)
a \O41 c		abc		y	not octal (\O)
\O41			''		n	not octal (\O)
c \O41 d		abc!def		n	not octal (\O)
c \O41 d		abc\o41def	n	not octal (\O)
c \O41+ d		abc!!def	n	not octal (\O)
a \O41+ f		abcdef		y	not octal (\O)
\O[41]			a		y	not octal (\O[])
a \O[41] c		abc		y	not octal (\O[])
\O[41]			''		n	not octal (\O[])
c \O[41] d		abc!def		n	not octal (\O[])
c \O[41] d		abc\o41def	n	not octal (\O[])
c \O[41]+ d		abc!!def	n	not octal (\O[])
a \O[41]+ f		abcdef		y	not octal (\O[])
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


##   Backtracking control tests
a* a			bazaar		y	control
a*:a			bazaar		/:a/	basic
a*: a			bazaar		n	basic
^[a|b]*  aba		abbabbababba	y	control
^[a|b]*: aba		abbabbababba	n	outside a group
\d+:			123abc		y	cut on character class shortcut
\d+:			abc		n	cut on character class shortcut
[ if    not | ify ]	verify		y	control
[ if :: not | ify ]	verify		n	inside a group
  if :: not | ify	verify		n	the default all group
[ if :  not | ify ]	verify		y	simple backtrack still works
[ if :: not | ify ] | verify	verify	y	rule continues
[ when     ever ] | whence	whence	y	full backtrack failure
[ when ::: ever ] | whence	whence	n	full backtrack failure
ab::cd | gh::ij		xyabghij	y	group cut at top
ab:::cd | gh:::ij	xyabghij	n	rule cut at top
[ab::cd | gh::ij]	xyabghij	y	group cut in group
[ab:::cd | gh:::ij]	xyabghij	n	rule cut in group
[ ab | abc ]: de	xyzabcde	n	no backtrack into group
( ab | abc ): de	xyzabcde	n	no backtrack into subpattern
[ when <commit> ever ] | whence	whence	n	full backtrack failure

##    Enumerated character lists
<[c]>			abcdef		y	character class
<[ z ]>			abc def		n	character class ignores ws
<[dcb]>**{3}		abcdef		y	repeated character class
^<[a]>			abcdef		y	anchored character class
<-[e]>			abcdef		y	negated character class
^<[a]>?			abcdef		y	anchored optional character class
<-[e]>?			abcdef		y	negated optional character class
<-[dcb]>**{3}		abcdef		n	repeated negated character class
^<-[e]>			abcdef		y	anchored negated character class
^<-[a]>			abcdef		n	anchored negated character class
<[b..d]>		abcdef		y	character range
<[b .. d]>		c		y	character range ignores ws
<[b..d]>		abxxef		y	character range
<[b..d]>		axcxef		y	character range
<[b..d]>		axxdef		y	character range
<[b..d]>		axxxef		n	character range
<-[b..d]>		abcdef		y	negated character range
<- [b..d]>		abcdef		y	negated allows ws
<-[b..d]>		bbccdd		n	negated character range
<-[d..b]>		bbccdd		/parse error/	illegal character range
<[\-]>			ab-def		y	escaped hyphen
<[\-]>			abcdef		n	escaped hyphen
<-[\-]>			---x--		y	negated escaped hyphen
<-[\-]>			------		n	negated escaped hyphen
<[\-+]>			ab-def		y	escaped hyphen in range
<[\-+]>			ab+def		y	escaped hyphen in range
<[\-+]>			abcdef		n	escaped hyphen in range
<[+\-]>			ab-def		y	escaped hyphen in range
<[+\-]>			ab+def		y	escaped hyphen in range
<[+\-]>			abcdef		n	escaped hyphen in range
<-[\-+]>		---x--		y	negated escaped hyphen in range
<-[\-+]>		------		n	negated escaped hyphen in range
<-[+\-]>		---x--		y	negated escaped hyphen in range
<-[+\-]>		------		n	negated escaped hyphen in range
^><[<]>			><		/rule error/	lt character class
^<[>]><			><		y	gt character class
^<[><]>**{2}		><		y	gt, lt character class
^<[<>]>**{2}		><		y	lt, gt  character class
^<-[><]>		><		n	not gt, lt character class
^<-[<>]>		><		n	not lt, gt  character class
<'... --- ...'>		... --- ...	y	literal match (\')
<'... --- ...'>		...---...	n	literal match (\')
<'ab\'>cd'>		ab'>cd		y	literal match with quote
<'ab\\cd'>		ab\o134cd	y	literal match with backslash

##  builtin subrules
abc <fail> def	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	n				<fail>

<?wb>def		abc\ndef\n-==\nghi	y	word boundary \W\w
abc<?wb>		abc\ndef\n-==\nghi	y	word boundary \w\W
<?wb>abc		abc\ndef\n-==\nghi	y	BOS word boundary
ghi<?wb>		abc\ndef\n-==\nghi	y	EOS word boundary
a<?wb>			abc\ndef\n-==\nghi	n	\w\w word boundary
-<?wb>			abc\ndef\n-==\nghi	n	\W\W word boundary
<!wb>def		abc\ndef\n-==\nghi	n	nonword boundary \W\w
abc<!wb>		abc\ndef\n-==\nghi	n	nonword boundary \w\W
<!wb>abc		abc\ndef\n-==\nghi	n	BOS nonword boundary
ghi<!wb>		abc\ndef\n-==\nghi	n	EOS nonword boundary
a<!wb>			abc\ndef\n-==\nghi	y	\w\w nonword boundary
-<!wb>			abc\ndef\n-==\nghi	y	\W\W nonword boundary

<upper>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<upper>: <A @ 45>/		<upper>
<?upper>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <A @ 45>/			<?upper>
<?upper>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <ABCDEFGHIJ @ 45>/	<?upper>+
<lower>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<lower>: <a @ 55>/		<lower>
<?lower>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <a @ 55>/			<?lower>
<?lower>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <abcdefghij @ 55>/	<?lower>+
<alpha>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<alpha>: <A @ 45>/		<alpha>
<?alpha>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <A @ 45>/			<?alpha>
<?alpha>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <ABCDEFGHIJabcdefghij @ 45>/	<?alpha>+
<digit>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<digit>: <0 @ 35>/		<digit>
<?digit>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <0 @ 35>/			<?digit>
<?digit>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <0123456789 @ 35>/	<?digit>+
<xdigit>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<xdigit>: <0 @ 35>/		<xdigit>
<?xdigit>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <0 @ 35>/			<?xdigit>
<?xdigit>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <0123456789ABCDEF @ 35>/	<?xdigit>+
<space>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<space>: <\s* @ 0>/		<space>
<?space>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <\s* @ 0>/		<?space>
<?space>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <\s* @ 0>/		<?space>+
<blank>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<blank>: <\t @ 0>/		<blank>
<?blank>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <\t @ 0>/			<?blank>
<?blank>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <\t @ 0>/			<?blank>+
<cntrl>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<cntrl>: <\t @ 0>/		<cntrl>
<?cntrl>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <\t @ 0>/			<?cntrl>
<?cntrl>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <\t\n\r @ 0>/		<?cntrl>+
<punct>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<punct>: <! @ 4>/		<punct>
<?punct>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <! @ 4>/			<?punct>
<?punct>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <.*\} @ 4>/		<?punct>+
<alnum>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<alnum>: <0 @ 35>/		<alnum>
<?alnum>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <0 @ 35>/	<?alnum>
<?alnum>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <0123456789ABCDEFGHIJabcdefghij @ 35>/	<?alnum>+
<sp>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<sp>: <  @ 3>/	<sp>
<?sp>+		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <  @ 3>/	<?sp>+
<lt>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<lt>: << @ 21>/	<lt>
<?lt>+		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: << @ 21>/	<?lt>+
<gt>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<gt>: <> @ 23>/	<gt>
<?gt>+		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <> @ 23>/	<?gt>+
<dot>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<dot>: <. @ 17>/	<dot>
<?dot>+		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <. @ 17>/	<?dot>+
<ident>			2+3 ab2		/mob<ident>: <ab2 @ 4>/		capturing builtin <ident>
<name>			ab::cd::x3::42	/mob<name>: <ab::cd::x3 @ 0>/	capturing builtin <name>

## lookarounds
<before .d> a.		abacad		/mob: <ad @ 4>/			lookahead <before>
<before c> ....		abacad		n				lookahead <before>
<before> .		abcd		n				null <before>
<!before ..b> aa	aabaaa		/mob: <aa @ 3>/			negated lookahead
<after a>b		ab		y				lookbehind <after>
<after a>b		cb		n				lookbehind <after>
<after a>b		b		n				lookbehind <after>
<!after c>b		ab		y				lookbehind <!after>
<!after c>b		cb		n				lookbehind <!after>
<!after c>b		b		y				lookbehind <!after>
<!after <[cd]>>b	dbcb		n				lookbehind <!after>
<!after <[cd]>><[ab]>	dbaacb		y				lookbehind <!after>
<!after c|d>b		dbcb		n				lookbehind <!after>
<!after c|d><[ab]>	dbaacb		y				lookbehind <!after>
<!after cd><[ab]>	cbaccb		y				lookbehind <!after>
$ <after ^a>		a		y				lookbehind <after>
<after x+>y		axxbxxyc	y				lookbehind <after>
<[a..z]>+		az		y				metasyntax with leading + (<+...>)
<+[a..z]>+		az		y				metasyntax with leading + (<+...>)
<+alpha>+		az		y				metasyntax with leading + (<+...>)

<null>			''		y		null pattern (<null>)
^ <null>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<null>: < @ 0>/	null pattern (<null>)
<null> $	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<null>: < @ 65>/	null pattern (<null>)
abc <null> def	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	y			null pattern (<null>)
x | y | <null>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	y			null pattern (<null>)
x | y | <?null>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	y			null pattern (<null>)

a[b}		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/rule error/	mismatched close

##   captures
(a.)..(..)		zzzabcdefzzz	y			basic match
(a.)..(..)		zzzabcdefzzz	/mob: <abcdef @ 3>/	basic $0
(a.)..(..)		zzzabcdefzzz	/mob 0: <ab @ 3>/	basic $1
(a.)..(..)		zzzabcdefzzz	/mob 1: <ef @ 7>/	basic $2
(a(b(c))(d))		abcd		y			nested match
(a(b(c))(d))		abcd		/mob: <abcd @ 0>/	nested match
(a(b(c))(d))		abcd		/mob 0: <abcd @ 0>/	nested match
(a(b(c))(d))		abcd		/mob 0 0: <bc @ 1>/	nested match
(a(b(c))(d))		abcd		/mob 0 0 0: <c @ 2>/	nested match
(a(b(c))(d))		abcd		/mob 0 1: <d @ 3>/	nested match
((\w+)+)		abcd		/mob: <abcd @ 0>/	nested match
((\w+)+)		abcd		/mob 0: <abcd @ 0>/	nested match
((\w+)+)		abcd		/mob 0 0 0: <abcd @ 0>/	nested match
((\w+)+)	ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz	/mob: <\w+ @ 0>/	nested match
((\w+)+)	ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz	/mob 0: <\w+ @ 0>/	nested match
((\w+)+)	ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz	/mob 0 0 0: <\w+ @ 0>/	nested match
(a) [ (bc) (d) | .* (ef) ] .* (g)	abcdefg	/mob 0: <a @ 0>/	alt subpattern before group
(a) [ (bc) (d) | .* (ef) ] .* (g)	abcdefg	/mob 1: <bc @ 1>/	alt subpattern in group
(a) [ (bc) (d) | .* (ef) ] .* (g)	abcdefg	/mob 2: <d @ 3>/	alt subpattern in group
(a) [ (bc) (d) | .* (ef) ] .* (g)	abcdefg	/mob 3: <g @ 6>/	alt subpattern after group
(a) [ (bc) (x) | .* (ef) ] .* (g)	abcdefg	/mob 1: <ef @ 4>/	2nd alt subpattern in group
(a) [ (bc) (x) | .* (ef) ] .* (g)	abcdefg	/mob 3: <g @ 6>/	2nd alt subpattern after group
( (.) )*				abc	/mob 0 1 0: <b @ 1>/	nested repeated captures
[ (.) ]*				abc	/mob 0 1: <b @ 1>/	nested repeated captures
( [.] )*				abc	/mob 0 1: <b @ 1>/	nested repeated captures
(.) (.) $7:=(.) (.) $4:=(.)		abcdefg	/mob 0: <a @ 0>/	numbered aliases $1
(.) (.) $7:=(.) (.) $4:=(.)		abcdefg	/mob 1: <b @ 1>/	numbered aliases $2
(.) (.) $7:=(.) (.) $4:=(.)		abcdefg	/mob 7: <c @ 2>/	numbered aliases $7
(.) (.) $7:=(.) (.) $4:=(.)		abcdefg	/mob 8: <d @ 3>/	numbered aliases $8
(.) (.) $7:=(.) (.) $4:=(.)		abcdefg	/mob 4: <e @ 4>/	numbered aliases $4
$1:=[ (.) (.) (.) ] (.)			abcdefg	/mob 1: <abc @ 0>/	perl5 numbered captures $1
$1:=[ (.) (.) (.) ] (.)			abcdefg	/mob 2: <a @ 0>/	perl5 numbered captures $1
$1:=[ (.) (.) (.) ] (.)			abcdefg	/mob 3: <b @ 1>/	perl5 numbered captures $1
$1:=[ (.) (.) (.) ] (.)			abcdefg	/mob 4: <c @ 2>/	perl5 numbered captures $1
$1:=[ (.) (.) (.) ] (.)			abcdefg	/mob 5: <d @ 3>/	perl5 numbered captures $1
#:s $<key>:=[\w+] = $<val>:=[\S+]	 abc = 123	/mob<key>: <abc @ 1>/	named capture
#:s $<key>:=[\w+] = $<val>:=[\S+]	 abc = 123	/mob<val>: <123 @ 7>/	named capture
#:s (\w+) $<foo>:=(\w+) (\w+)	   	abc def ghi	/mob<foo>: <def @ 7>/	mixing named and unnamed capture
#:s (\w+) $<foo>:=(\w+) (\w+)	   	abc def ghi	/mob 1: <ghi @ 11>/	mixing named and unnamed capture
#<alpha> [ - <alpha> ]?	   		abc def ghi	/mob<alpha> 0: <a @ 3>/	multiple subrule captures in same scope
#[(.)$0]+				bookkeeper	y			backreference
#(\w+) <?ws> $0				hello hello	y			backreference at end of string
#[(.)$0]+				bookkeeper	/mob 0 0: <o @ 1>/	backref $1
#[(.)$0]+				bookkeeper	/mob 0 1: <k @ 3>/	backref $1
#[(.)$0]+				bookkeeper	/mob 0 2: <e @ 5>/	backref $1
#(.)*x					123x		/mob: <123x @ 0>/	repeated dot capture


##  modifiers
:i bcd			abcdef	y	ignorecase (:i)
:i bcd			aBcdef	y	ignorecase (:i)
:i bcd			abCdef	y	ignorecase (:i)
:i bcd			abcDef	y	ignorecase (:i)
:i bcd			abc-ef	n	ignorecase (:i)
:ignorecase bcd		abcdef	y	ignorecase (:ignorecase)
:ignorecase bcd		aBCDef	y	ignorecase (:ignorecase)
:ignorecase bcd		abc-ef	n	ignorecase (:ignorecase)
:i(0) bcd		abcdef	y	ignorecase, repetition (:i(0))
:i(0) bcd		abCdef	n	ignorecase, repetition (:i(0))
:i(1) bcd		abcdef	y	ignorecase, repetition (:i(1))
:i(1) bcd		abCdef	y	ignorecase, repetition (:i(1))
:i(1) bcd		aBxDef	n	ignorecase, repetition (:i(1))
:0i bcd			abcdef	y	ignorecase, repetition (:0i)
:0i bcd			abCdef	n	ignorecase, repetition (:0i)
:1i bcd			abcdef	y	ignorecase, repetition (:1i)
:1i bcd			abCdef	y	ignorecase, repetition (:1i)
:1i bcd			aBCDef	y	ignorecase, repetition (:1i)
:1i bcd			aBxDef	n	ignorecase, repetition (:1i)
ab [:i cd ] ef		abcdef	y	ignorecase, lexical (:i)
ab [:i cd ] ef		abCdef	y	ignorecase, lexical (:i)
ab [:i cd ] ef		abcDef	y	ignorecase, lexical (:i)
ab [:i cd ] ef		abCDef	y	ignorecase, lexical (:i)
ab [:i cd ] ef		aBCDef	n	ignorecase, lexical (:i)
ab [:i cd ] ef		abCDEf	n	ignorecase, lexical (:i)
:i ab [:i cd ] ef	abCDef	y	ignorecase, lexical (:i)
:i ab [:i cd ] ef	AbCDeF	y	ignorecase, lexical (:i)
:i ab [:i cd ] ef	AbcdeF	y	ignorecase, lexical (:i)
:i a [:i(0) b [:i(1) c [:0i d [:1i e [:i(0) f ] ] ] ] ]		AbCdEf		y	ignorecase, lexical (:i)
:i aa [:i(0) bb [:i(1) cc [:0i dd [:1i ee [:i(0) ff ] ] ] ] ]	AabbCcddEeff	y	ignorecase, lexical (:i)
:i a [:i(0) b [:i(1) c [:0i d [:1i e [:i(0) f ] ] ] ] ]		AbCdEF		n	ignorecase, lexical (:i)
:i aa [:i(0) bb [:i(1) cc [:0i dd [:1i ee [:i(0) ff ] ] ] ] ]	AabbCcddEeFf	n	ignorecase, lexical (:i)
:i ab [:i(0) cd ] ef	AbcdeF	y	ignorecase, lexical repetition (:i)
:i ab [:!i cd ] ef	AbcdeF	y	ignorecase, lexical repetition (:i)
:i ab [:0i cd ] ef	AbcdeF	y	ignorecase, lexical repetition (:i)
:0i ab [:1i cd ] ef	abCDef	y	ignorecase, lexical repetition (:i)
:0i ab [:1i cd ] ef	AbCDeF	n	ignorecase, lexical repetition (:i)
:0i ab [:1i cd ] ef	AbcdeF	n	ignorecase, lexical repetition (:i)
:0i ab [:i(0) cd ] ef	abcdef	y	ignorecase, lexical repetition (:i)
:0i ab [:1i cd ] ef	AbcdeF	n	ignorecase, lexical repetition (:i)
:i(1) ab [:1i cd ] ef	AbCdeF	y	ignorecase, lexical repetition (:i)
:i(1) ab [:i(0) cd ] ef	AbcdeF	y	ignorecase, lexical repetition (:i)
:i(1) ab [:i(0) cd ] ef	AbcDeF	n	ignorecase, lexical repetition (:i)
:i(2) ab [:i(999) cd ] ef	ABCDEF	y	ignorecase, lexical repetition (:i)
:1i ab [:i(1) cd ] ef		ABCDEF	y	ignorecase, lexical repetition (:i)
:0i ab [:1i cd ] ef		abcDeF	n	ignorecase, lexical repetition (:i)
:2i ab [:999i cd ] ef		ABCDEF	y	ignorecase, lexical repetition (:i)
ab [:ignorecase cd ] ef		abCDef	y	ignorecase, lexical (:ignorecase)
ab [:ignorecase cd ] ef		aBCDef	n	ignorecase, lexical (:ignorecase)
:1ignorecase ab [:ignorecase(1) cd ] ef	ABCDEF	y	ignorecase, lexical repetition (:ignorecase)
:s bcd			a bcdef		y	sigspace (:s)
:s bcd			a bcd ef	y	sigspace (:s)
:s bcd			abcdef		n	sigspace (:s)
:s bcd			abcd ef		n	sigspace (:s)
:s bcd			ab cdef		n	sigspace (:s)
:s b c d		a b c d ef	y	sigspace (:s)
:s b c d		a b c def	y	sigspace (:s)
:s b c d		ab c d ef	n	sigspace (:s)
:s b c d		a bcdef		n	sigspace (:s)
:s b c d		abcdef		n	sigspace (:s)
:sigspace bcd		a bcdef		y	sigspace (:sigspace)
:sigspace bcd		a bcd ef	y	sigspace (:sigspace)
:sigspace bcd		abcdef		n	sigspace (:sigspace)
:sigspace b c d		a b c d ef	y	sigspace (:sigspace)
:sigspace b c d		a b c def	y	sigspace (:sigspace)
:sigspace b c d		ab c d ef	n	sigspace (:sigspace)
:s(1) b c [:s(0) d e f ]	a b c def	y	sigspace, lexical repetition (:s)
:s(1) b c [:s(0) d e f ]	a b c def	y	sigspace, lexical repetition (:s)
:s b c [:!s d e f ]	a b c def	y	sigspace, lexical repetition (:s)
:s(0) b c [:s(1) d e f ]	a b c def	n	sigspace, lexical repetition (:s)
:!s b c [:s d e f ]	a b c def	n	sigspace, lexical repetition (:s)
:s(0) b c [:s(0) d e f ]	a b c def	n	sigspace, lexical repetition (:s)
:!s b c [:!s d e f ]	a b c def	n	sigspace, lexical repetition (:s)
:s ab 				ab		y	sigspace, trailing ws
foo\s*-?\s*bar			foo\t \n-\n\t bar	y	basic match
foo\s*-?\s*bar			foo - bar	y	basic match
foo\s+-?\s*bar			foo   bar	y	basic match \s+ \s*
foo\s+-?\s*bar			foo  -bar	y	basic match \s+ \s*
foo\s*-?\s+bar			foo-  bar	y	basic match \s* \s+
foo -? bar			foo-bar		y	basic match \s* \s*
foo -? bar			foobar		y	basic match
foo -? bar			foo - bar	n	basic non-match
:s foo -? bar			foo\n \t- \t\t\nbar	y	basic ws match
:s foo -? bar			foo - bar	y	basic ws match
:s foo -? bar			foo   bar	y	basic ws match \s+ \s*
:s foo -? bar			foo  -bar	y	basic ws match \s+ \s*
:s foo -? bar			foo-  bar	y	basic ws match \s* \s+
:s foo -? bar			foo-bar		y	basic ws match \s* \s*
:s foo -? bar			foobar		n	basic ws non-match
:s()foo -? bar			foo - bar	n	basic ws match
:s[]foo -? bar			foo - bar	y	basic ws match
:s<?wb>foo -? bar		foo - bar	y	basic ws match with boundary modifier separation
:s::foo -? bar			foo - bar	y	basic ws match with backtrack no-op modifier separation
:s::(\w+) \:= (\S+)		dog := spot	/mob 0: <dog @ 0>/	sigspace and capture together
:s::(\w+) \:= (\S+)		dog := spot	/mob 1: <spot @ 7>/	sigspace and capture together
:perl5 \A.*? bcd\Q$\E..\z	a bcd$ef	y	perl5 syntax (:perl5)
:x(6) \d			123456		y	repetition (:x)
:x(3) \d			123456		y	repetition (:x)
:x(0) \d			123456		y	repetition (:x)
:nth(3) a \d			a1a2a3		y	nth occurance (:nth)
:nth(4) a \d			a1a2a3		n	nth occurance (:nth)
:nth(0) a \d			a1a2a3		n	nth occurance (:nth)
