xref: /freebsd/lib/libregex/tests/gnuext.in (revision f7c32ed617858bcd22f8d1b03199099d50125721)
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
27abc\'	&	abc	abc
28\`abc\'	&	abc	abc
29\`.+\'	-	abNc	abNc
30\`.\+\'	b	abNc	abNc
31(\`a)	-	Na
32(a\`)	-	aN
33(a\')	-	aN
34(\'a)	-	Na
35