xref: /netbsd-src/tests/lib/libc/regex/data/backref.in (revision 17f9a364e668e2a515980aeea268264bdfd1c52d)
1*17f9a364Spgoyette# back references, ugh
2*17f9a364Spgoyettea\(b\)\2c	bC	ESUBREG
3*17f9a364Spgoyettea\(b\1\)c	bC	ESUBREG
4*17f9a364Spgoyettea\(b*\)c\1d	b	abbcbbd	abbcbbd	bb
5*17f9a364Spgoyettea\(b*\)c\1d	b	abbcbd
6*17f9a364Spgoyettea\(b*\)c\1d	b	abbcbbbd
7*17f9a364Spgoyette^\(.\)\1	b	abc
8*17f9a364Spgoyettea\([bc]\)\1d	b	abcdabbd	abbd	b
9*17f9a364Spgoyettea\(\([bc]\)\2\)*d	b	abbccd	abbccd
10*17f9a364Spgoyettea\(\([bc]\)\2\)*d	b	abbcbd
11*17f9a364Spgoyette# actually, this next one probably ought to fail, but the spec is unclear
12*17f9a364Spgoyettea\(\(b\)*\2\)*d		b	abbbd	abbbd
13*17f9a364Spgoyette# here is a case that no NFA implementation does right
14*17f9a364Spgoyette\(ab*\)[ab]*\1	b	ababaaa	ababaaa	a
15*17f9a364Spgoyette# check out normal matching in the presence of back refs
16*17f9a364Spgoyette\(a\)\1bcd	b	aabcd	aabcd
17*17f9a364Spgoyette\(a\)\1bc*d	b	aabcd	aabcd
18*17f9a364Spgoyette\(a\)\1bc*d	b	aabd	aabd
19*17f9a364Spgoyette\(a\)\1bc*d	b	aabcccd	aabcccd
20*17f9a364Spgoyette\(a\)\1bc*[ce]d	b	aabcccd	aabcccd
21*17f9a364Spgoyette^\(a\)\1b\(c\)*cd$	b	aabcccd	aabcccd
22