a[b-d] aac y $& ac
a[-b] a- y $& a-
a[b-] a- y $& a-
-a[b-a] - c - /a[b-a]/: invalid [] range in regexp
+a[b-a] - c - /a[b-a]/: invalid [] range "b-a" in regexp
a[]b - c - /a[]b/: unmatched [] in regexp
a[ - c - /a[/: unmatched [] in regexp
a] a] y $& a]
'a[b-d]'i AAC y $& AC
'a[-b]'i A- y $& A-
'a[b-]'i A- y $& A-
-'a[b-a]'i - c - /a[b-a]/: invalid [] range in regexp
+'a[b-a]'i - c - /a[b-a]/: invalid [] range "b-a" in regexp
'a[]b'i - c - /a[]b/: unmatched [] in regexp
'a['i - c - /a[/: unmatched [] in regexp
'a]'i A] y $& A]
'((?x:.) )' x y $1- x -
'((?-x:.) )'x x y $1- x-
foo.bart foo.bart y - -
+'^d[x][x][x]'m abcd\ndxxx y - -
+.X(.+)+X bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.X(.+)+XX bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.XX(.+)+X bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.X(.+)+X bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+.X(.+)+XX bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+.XX(.+)+X bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+.X(.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.X(.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.XX(.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.X(.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+.X(.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+.XX(.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+.[X](.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.[X](.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.[X][X](.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
+.[X](.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+.[X](.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+.[X][X](.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
+tt+$ xxxtt y - -
+([a-\d]+) za-9z y $1 a-9
+([\d-z]+) a0-za y $1 0-z
+([\d-\s]+) a0- z y $1 0-
+([a-[:digit:]]+) za-9z y $1 a-9
+([[:digit:]-z]+) =0-z= y $1 0-z
+([[:digit:]-[:alpha:]]+) =0-z= y $1 0-z
+\GX.*X aaaXbX n - -
+(\d+\.\d+) 3.1415926 y $1 3.1415926
+(\ba.{0,10}br) have a web browser y $1 a web br
+'\.c(pp|xx|c)?$'i Changes n - -
+'\.c(pp|xx|c)?$'i IO.c y - -
+'(\.c(pp|xx|c)?$)'i IO.c y $1 .c
+^([a-z]:) C:/ n - -
+'^\S\s+aa$'m \nx aa y - -
+(^|a)b ab y - -
+^([ab]*?)(b)?(c)$ abac y -$2- --
+(\w)?(abc)\1b abcab n - -
+^(?:.,){2}c a,b,c y - -
+^(.,){2}c a,b,c y $1 b,
+^(?:[^,]*,){2}c a,b,c y - -
+^([^,]*,){2}c a,b,c y $1 b,
+(?i) y - -
+'(?!\A)x'm a\nxb\n y - -
+^(a(b)?)+$ aba y -$1-$2- -a--
+^(aa(bb)?)+$ aabbaa y -$1-$2- -aa--
+^(a)?a$ a y -$1- --
+^(a)?(?(1)a|b)+$ a n - -