/(a)b|/ /abc/ abc defabc \Aabc *** Failers \Adefabc ABC /^abc/ abc \Aabc *** Failers defabc \Adefabc /a+bc/ /a*bc/ /a{3}bc/ /(abc|a+z)/ /^abc$/ abc *** Failers def\nabc /ab\gdef/X /(?X)ab\gdef/X /x{5,4}/ /z{65536}/ /[abcd/ /[\B]/ /[z-a]/ /^*/ /(abc/ /(?# abc/ /(?z)abc/ /.*b/ /.*?b/ /cat|dog|elephant/ this sentence eventually mentions a cat this sentences rambles on and on for a while and then reaches elephant /cat|dog|elephant/S this sentence eventually mentions a cat this sentences rambles on and on for a while and then reaches elephant /cat|dog|elephant/iS this sentence eventually mentions a CAT cat this sentences rambles on and on for a while to elephant ElePhant /a|[bcd]/S /(a|[^\dZ])/S /(a|b)*[\s]/S /(ab\2)/ /{4,5}abc/ /(a)(b)(c)\2/ abcb \O0abcb \O3abcb \O6abcb \O9abcb \O12abcb /(a)bc|(a)(b)\2/ abc \O0abc \O3abc \O6abc aba \O0aba \O3aba \O6aba \O9aba \O12aba /abc$/E abc *** Failers abc\n abc\ndef /(a)(b)(c)(d)(e)\6/ /the quick brown fox/ the quick brown fox this is a line with the quick brown fox /the quick brown fox/A the quick brown fox *** Failers this is a line with the quick brown fox /ab(?z)cd/ /^abc|def/ abcdef abcdef\B /.*((abc)$|(def))/ defabc \Zdefabc /abc/P abc *** Failers /^abc|def/P abcdef abcdef\B /.*((abc)$|(def))/P defabc \Zdefabc /the quick brown fox/P the quick brown fox *** Failers The Quick Brown Fox /the quick brown fox/Pi the quick brown fox The Quick Brown Fox /abc.def/P *** Failers abc\ndef /abc$/P abc abc\n /(abc)\2/P /(abc\1)/P abc /)/ /a[]b/ /[^aeiou ]{3,}/ co-processors, and for /<.*>/ abcghinop /<.*?>/ abcghinop /<.*>/U abcghinop /<.*>(?U)/ abcghinop /<.*?>/U abcghinop /={3,}/U abc========def /(?U)={3,}?/ abc========def /(?^abc)/m abc def\nabc *** Failers defabc /(?<=ab(c+)d)ef/ /(?<=ab(?<=c+)d)ef/ /(?<=ab(c|de)f)g/ /The next three are in testinput2 because they have variable length branches/ /(?<=bullock|donkey)-cart/ the bullock-cart a donkey-cart race *** Failers cart horse-and-cart /(?<=ab(?i)x|y|z)/ /(?>.*)(?<=(abcd)|(xyz))/ alphabetabcd endingxyz /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/ abxyZZ abXyZZ ZZZ zZZ bZZ BZZ *** Failers ZZ abXYZZ zzz bzz /(?[^()]+) # Either a sequence of non-brackets (no backtracking) | # Or (?R) # Recurse - i.e. nested bracketed string )* # Zero or more contents \) # Closing ) /x (abcd) (abcd)xyz xyz(abcd) (ab(xy)cd)pqr (ab(xycd)pqr () abc () 12(abcde(fsh)xyz(foo(bar))lmno)89 *** Failers abcd abcd) (abcd /\( ( (?>[^()]+) | (?R) )* \) /xg (ab(xy)cd)pqr 1(abcd)(x(y)z)pqr /\( (?: (?>[^()]+) | (?R) ) \) /x (abcd) (ab(xy)cd) (a(b(c)d)e) ((ab)) *** Failers () /\( (?: (?>[^()]+) | (?R) )? \) /x () 12(abcde(fsh)xyz(foo(bar))lmno)89 /\( ( (?>[^()]+) | (?R) )* \) /x (ab(xy)cd) /\( ( ( (?>[^()]+) | (?R) )* ) \) /x (ab(xy)cd) /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x (ab(xy)cd) (123ab(xy)cd) /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x (ab(xy)cd) (123ab(xy)cd) /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x (ab(xy)cd) /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x (abcd(xyz

qrs)123) /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x (ab(cd)ef) (ab(cd(ef)gh)ij) /^[[:alnum:]]/D /^[[:alpha:]]/D /^[[:ascii:]]/D /^[[:cntrl:]]/D /^[[:digit:]]/D /^[[:graph:]]/D /^[[:lower:]]/D /^[[:print:]]/D /^[[:punct:]]/D /^[[:space:]]/D /^[[:upper:]]/D /^[[:xdigit:]]/D /^[[:word:]]/D /^[[:^cntrl:]]/D /^[12[:^digit:]]/D /[01[:alpha:]%]/D /[[.ch.]]/ /[[=ch=]]/ /[[:rhubarb:]]/ /[[:upper:]]/i A a /[[:lower:]]/i A a /((?-i)[[:lower:]])[[:lower:]]/i ab aB *** Failers Ab AB /[\200-\410]/ / End of testinput2 /