a.*c axyzd n - -
a[bc]d abc n - -
a[bc]d abd y $& abd
+a[b]d abd y $& abd
+[a][b][d] abd y $& abd
+.[b]. abd y $& abd
+.[b]. aBd n - -
+(?i:.[b].) abd y $& abd
a[b-d]e abd n - -
a[b-d]e ace y $& ace
a[b-d] aac y $& ac
^(.)\s+.$(?(1)) A B y $1 A # [perl #37688]
(?:r?)*?r|(.{2,4}) abcde y $1 abcd
(?!)+?|(.{2,4}) abcde y $1 abcd
+^(a*?)(?!(a{6}|a{5})*$) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y $+[1] 12 # super-linear cache bug may return 18
+^((?>(?:aa)?b)?) aab y $1 aab
+^((?:aa)*)(?:X+((?:\d+|-)(?:X+(.+))?))?$ aaaaX5 y $1 aaaa