1: regsubcomp and regsubexec tests 2008-02-14 2 3E/ /[az]/X/gg abc.xyz EFLAGS 4E/ /[az]/X/1g2 abc.xyz EFLAGS 5E/ /[az]/X/X abc.xyz EFLAGS 6E/ /([az])/\2/ abc.xyz ESUBREG 7 8E/t /[az]/X/g abc.xyz Xbc.xyX 9E/t /[az]/X/ abc.xyz Xbc.xyz 10E/t /[az]/X abc.xyz EDELIM 11E/t /[az]/ abc.xyz EDELIM 12E/t /[az] abc.xyz EDELIM 13 14Eqt /[az]/ abc.xyz (0,1) 15Eqt /[az] abc.xyz EDELIM 16Eqt /[abcxyz]*/ abc/xyz (0,3) 17Eqt /[abcxyz]* abc/xyz EDELIM 18Eqt /[abc/xyz]*/ abc/xyz (0,7) 19Eqt /[abc/xyz]* abc/xyz EDELIM 20 21E/ /[az]/X/g abc.xyz Xbc.xyX 22E/ /[az]/X/ abc.xyz Xbc.xyz 23E/ /[az]/X abc.xyz Xbc.xyz 24E/ /[az]/ abc.xyz bc.xyz 25E/ /[az] abc.xyz bc.xyz 26 27Eq /[az]/ abc.xyz (0,1) 28Eq /[az] abc.xyz (0,1) 29Eq /[abcxyz]*/ abc/xyz (0,3) 30Eq /[abcxyz]* abc/xyz (0,3) 31Eq /[abc/xyz]*/ abc/xyz (0,7) 32Eq /[abc/xyz]* abc/xyz (0,7) 33 34E/$ \\[az]\\X\\ abc.xyz EDELIM 35E/$ \n[az]\nX\n abc.xyz EDELIM 36E/$ \r[az]\rX\r abc.xyz EDELIM 37E/$ \t[az]\tX\t abc.xyz Xbc.xyz 38 39Eq$ \\[az]\\ abc.xyz EDELIM 40Eq$ \n[az]\n abc.xyz EDELIM 41Eq$ \r[az]\r abc.xyz EDELIM 42Eq$ \t[az]\t abc.xyz (0,1) 43 44E/ /[az]/X/g abc.xyz Xbc.xyX 45E/ /[az]/X/l abc.xyz xbc.xyz 46E/ /[az]/x/l abc.xyz xbc.xyz 47E/ /[az]/X/gl abc.xyz xbc.xyx 48E/ /[az]/x/gl abc.xyz xbc.xyx 49E/ /[az]/X/p abc.xyz Xbc.xyz 50E/ /[az]/X/s abc.xyz Xbc.xyz 51E/ /[az]/X/u abc.xyz Xbc.xyz 52E/ /[az]/x/u abc.xyz Xbc.xyz 53E/ /[az]/X/gu abc.xyz Xbc.xyX 54E/ /[az]/x/gu abc.xyz Xbc.xyX 55E/ /[az]/X/w abc.xyz Xbc.xyz 56E/ /[az]/X/wXXXX abc.xyz Xbc.xyz 57 58E/ /[az]/X/ abc.xyz Xbc.xyz 59E/ /[az]/X/g abc.xyz Xbc.xyX 60 61E/ /\b/-/ abc.xyz -abc.xyz 62E/ /\b/-/g abc.xyz -abc-.-xyz- 63 64E/ /\</-/ abc.xyz -abc.xyz 65E/ /\>/-/ abc.xyz abc-.xyz 66E/ /\<|\>/-/ abc.xyz -abc.xyz 67E/ /\</-/g abc.xyz -abc.-xyz 68E/ /\>/-/g abc.xyz abc-.xyz- 69E/ /\<|\>/-/g abc.xyz -abc-.-xyz- 70 71E/ /[[:<:]]/-/ abc.xyz -abc.xyz 72E/ /[[:>:]]/-/ abc.xyz abc-.xyz 73E/ /[[:<:]]|[[:>:]]/-/ abc.xyz -abc.xyz 74E/ /[[:<:]]/-/g abc.xyz -abc.-xyz 75E/ /[[:>:]]/-/g abc.xyz abc-.xyz- 76E/ /[[:<:]]|[[:>:]]/-/g abc.xyz -abc-.-xyz- 77 78E/ /.\b/&-/ abc.xyz abc-.xyz 79E/ /.\b/&-/g abc.xyz abc-.-xyz- 80E/ /.\b/\0-/ abc.xyz abc-.xyz 81E/ /.\b/\0-/g abc.xyz abc-.-xyz- 82 83E/ /\b./-&/ abc.xyz -abc.xyz 84E/ /\b./-&/g abc.xyz -a-b-c-.-x-y-z 85E/ /\b./-\0/ abc.xyz -abc.xyz 86E/ /\b./-\0/g abc.xyz -a-b-c-.-x-y-z 87 88E/ /.\b/&\&/ abc.xyz abc&.xyz 89E/ /.\b/&\&/g abc.xyz abc&.&xyz& 90E/ /.\b/\0\&/ abc.xyz abc&.xyz 91E/ /.\b/\0\&/g abc.xyz abc&.&xyz& 92 93E/ /\b./\&&/ abc.xyz &abc.xyz 94E/ /\b./\&&/g abc.xyz &a&b&c&.&x&y&z 95E/ /\b./\&\0/ abc.xyz &abc.xyz 96E/ /\b./\&\0/g abc.xyz &a&b&c&.&x&y&z 97 98E/ /\b./\%%/ abc:xyz %%bc:xyz 99E/ /\b./\%%/g abc:xyz %%%%%%%%%%%%%% 100 101E/ /(.*):(.*)/\2:\1/ ABC:xyz xyz:ABC 102E/ /(.*):(.*)/\1:\2/l ABC:xyz abc:xyz 103E/ /(.*):(.*)/\1:\2/u ABC:xyz ABC:XYZ 104E/ /(.*):(.*)/\L\1:\U\2/ ABC:xyz abc:XYZ 105 106E/ /^/x/g 12345 x12345 107E/ /$/x/g 12345 12345x 108E/ /^|$/x/g 12345 x12345x 109E/ /$|^/x/g 12345 x12345x 110E/ /2/x/g 12345 1x345 111E/ /^|2/x/g 12345 x1x345 112E/ /2|^/x/g 12345 x1x345 113E/ /$|2/x/g 12345 1x345x 114E/ /2|$/x/g 12345 1x345x 115E/ /2|^/x/g 12345 x1x345 116E/ /^|2|$/x/g 12345 x1x345x 117E/ /^|$|2/x/g 12345 x1x345x 118E/ /$|^|2/x/g 12345 x1x345x 119E/ /$|2|^/x/g 12345 x1x345x 120E/ /2|$|^/x/g 12345 x1x345x 121E/ /2|^|$/x/g 12345 x1x345x 122 123E/ /(^)/x/g 12345 x12345 124E/ /($)/x/g 12345 12345x 125E/ /(^)|($)/x/g 12345 x12345x 126E/ /($)|(^)/x/g 12345 x12345x 127E/ /(2)/x/g 12345 1x345 128E/ /(^)|2/x/g 12345 x1x345 129E/ /2|(^)/x/g 12345 x1x345 130E/ /($)|2/x/g 12345 1x345x 131E/ /2|($)/x/g 12345 1x345x 132E/ /(2)|(^)/x/g 12345 x1x345 133 134E/ /^|6/x/g 12345 x12345 135E/ /6|^/x/g 12345 x12345 136E/ /$|6/x/g 12345 12345x 137E/ /6|$/x/g 12345 12345x 138 139E/z /2|/x/g 12345 x1x3x4x5x 140E/z /6|/x/g 12345 x1x2x3x4x5x 141E/ /3|\</x/g 12345 626 x12x45 x626 142E/ /3|\</x/g 12345 1245 1245 x12x45 x1245 x1245 143 144E/ /a*/x/ 123 x123 145E/ /a*/x/ aaa x 146 147E/ /a*/x/g 123 x1x2x3x 148E/ /a*/x/g aaa x 149 150E/ /a*/x/1 123 x123 151E/ /a*/x/2 123 1x23 152E/ /a*/x/3 123 12x3 153E/ /a*/x/4 123 123x 154E/ /a*/x/5 123 123 155E/ /a*/x/1 aaa x 156E/ /a*/x/2 aaa aaa 157E/ /a*/x/3 aaa aaa 158 159E/ /a*/x/1g 123 x1x2x3x 160E/ /a*/x/2g 123 1x2x3x 161E/ /a*/x/3g 123 12x3x 162E/ /a*/x/4g 123 123x 163E/ /a*/x/5g 123 123 164E/ /a*/x/1g aaa x 165E/ /a*/x/2g aaa aaa 166E/ /a*/x/3g aaa aaa 167 168E/ /:/@/g 1:2:3 1@2@3 169E/ /@/:/g 1@2@3 1:2:3 170E/ /a/&:&:&:&:&:&:&:&/ ababa a:a:a:a:a:a:a:ababa 171 172E/ /:/@\&@/g 1:2:3 1@&@2@&@3 173E/ &:&@\&@&g 1:2:3 1@:@2@:@3 174 175E/ /.*/&&/ 123 123123 176E/ /.*/&&&&&&&&/ 123 123123123123123123123123 177 178B/xz /-l\(.*\)/lib\1.a/ -lcoshell libcoshell.a 179E/xz /-l(.*)/lib\1.a/ -lcoshell libcoshell.a 180 181K/ /[az]/X/gg abc.xyz EFLAGS 182K/ /[az]/X/1g2 abc.xyz EFLAGS 183K/ /[az]/X/X abc.xyz EFLAGS 184K/ /@([az])/\2/ abc.xyz ESUBREG 185 186K/ /[az]/X/ abc.xyz Xbc.xyz 187K/ /[az]/X/g abc.xyz Xbc.xyX 188 189K/ /\b/-/ abc.xyz -abc.xyz 190K/ /\b/-/g abc.xyz -abc-.-xyz- 191 192K/ /?\b/&-/ abc.xyz ab&-.xyz 193K/ /?\b/&-/g abc.xyz ab&-&-xy&- 194K/ /?\b/\0-/ abc.xyz abc-.xyz 195K/ /?\b/\0-/g abc.xyz abc-.-xyz- 196K/ /?\b/\0-/ abc.xyz abc-.xyz 197K/ /?\b/\0-/g abc.xyz abc-.-xyz- 198 199K/ /\b?/-&/ abc.xyz -&bc.xyz 200K/ /\b?/-&/g abc.xyz -&-&-&-&-&-&-& 201K/ /\b?/-\0/ abc.xyz -abc.xyz 202K/ /\b?/-\0/g abc.xyz -a-b-c-.-x-y-z 203K/ /\b?/-\0/ abc.xyz -abc.xyz 204K/ /\b?/-\0/g abc.xyz -a-b-c-.-x-y-z 205 206K/ /?\b/&\0/ abc.xyz ab&c.xyz 207K/ /?\b/&\0/g abc.xyz ab&c&.xy&z 208K/ /?\b/\0&/ abc.xyz abc&.xyz 209K/ /?\b/\0&/g abc.xyz abc&.&xyz& 210K/ /?\b/\0&/ abc.xyz abc&.xyz 211K/ /?\b/\0&/g abc.xyz abc&.&xyz& 212 213K/ /\b?/\0&/ abc.xyz a&bc.xyz 214K/ /\b?/\0&/g abc.xyz a&b&c&.&x&y&z& 215K/ /\b?/&\0/ abc.xyz &abc.xyz 216K/ /\b?/&\0/g abc.xyz &a&b&c&.&x&y&z 217K/ /\b?/&\0/ abc.xyz &abc.xyz 218K/ /\b?/&\0/g abc.xyz &a&b&c&.&x&y&z 219 220K/ /\b?/\%%/ abc:xyz ESUBREG 221K/ /\b?/%%/ abc:xyz %%bc:xyz 222K/ /\b?/%%/g abc:xyz %%%%%%%%%%%%%% 223 224K/ /@(*):@(*)/\2:\1/ ABC:xyz xyz:ABC 225K/ /@(*):@(*)/\1:\2/l ABC:xyz abc:xyz 226K/ /@(*):@(*)/\1:\2/u ABC:xyz ABC:XYZ 227K/ /@(*):@(*)/\L\1:\U\2/ ABC:xyz abc:XYZ 228