xref: /freebsd/lib/libregex/tests/gnuext.in (revision 4f52dfbb8d6c4d446500c5b097e3806ec219fbd4)
1# BRE Quantifiers
2ab\?c	b	abc	abc
3ab\+c	b	abc	abc
4# BRE Branching
5abc\|de	b	abc	abc
6a\|b\|c	b	abc	a
7\(ab\|bc\)	b	abcd	ab
8# ERE Backrefs
9(ab)\1	-	ab
10(ab)\1	-	abab	abab
11\1(ab)	C	ESUBREG
12(a)(b)(c)(d)(e)(f)(g)(h)(i)\9	-	abcdefghii	abcdefghii
13# \w, \W, \s, \S (alnum, ^alnum, space, ^space)
14\w+	-	-%@a0X-	a0X
15\w\+	b	-%@a0X-	a0X
16\s+	-	aSNTb	SNT
17\s\+	b	aSNTb	SNT
18# Word boundaries (\b, \B, \<, \>, \`, \')
19# (is/not boundary, start/end word, start/end subject string)
20\babc\b	&	<abc>	abc
21\<abc\> &	<abc>	abc
22\Babc\B	&	abc
23\B[abc]\B	&	<abc>	b
24\B[abc]+	-	<abc>	bc
25\B[abc]\+	b	<abc>	bc
26\`abc\'	&	abc	abc
27\`.+\'	-	abNc	abNc
28\`.\+\'	b	abNc	abNc
29(\`a)	-	Na
30(a\')	-	aN
31