1 |
/-- Because of problems with Perl 5.6 in handling UTF-8 vs non UTF-8 --/ |
/\x{100}/8DM |
|
/-- strings automatically, do not use the \x{} construct except with --/ |
|
|
/-- patterns that have the /8 option set, and don't use them without! --/ |
|
|
|
|
|
/a.b/8 |
|
|
acb |
|
|
a\x7fb |
|
|
a\x{100}b |
|
|
*** Failers |
|
|
a\nb |
|
2 |
|
|
3 |
/a(.{3})b/8 |
/\x{1000}/8DM |
|
a\x{4000}xyb |
|
|
a\x{4000}\x7fyb |
|
|
a\x{4000}\x{100}yb |
|
|
*** Failers |
|
|
a\x{4000}b |
|
|
ac\ncb |
|
4 |
|
|
5 |
/a(.*?)(.)/ |
/\x{10000}/8DM |
|
a\xc0\x88b |
|
6 |
|
|
7 |
/a(.*?)(.)/8 |
/\x{100000}/8DM |
|
a\x{100}b |
|
8 |
|
|
9 |
/a(.*)(.)/ |
/\x{1000000}/8DM |
|
a\xc0\x88b |
|
10 |
|
|
11 |
/a(.*)(.)/8 |
/\x{4000000}/8DM |
|
a\x{100}b |
|
12 |
|
|
13 |
/a(.)(.)/ |
/\x{7fffFFFF}/8DM |
|
a\xc0\x92bcd |
|
14 |
|
|
15 |
/a(.)(.)/8 |
/[\x{ff}]/8DM |
|
a\x{240}bcd |
|
16 |
|
|
17 |
/a(.?)(.)/ |
/[\x{100}]/8DM |
|
a\xc0\x92bcd |
|
18 |
|
|
19 |
/a(.?)(.)/8 |
/\x{ffffffff}/8 |
|
a\x{240}bcd |
|
20 |
|
|
21 |
/a(.??)(.)/ |
/\x{100000000}/8 |
|
a\xc0\x92bcd |
|
22 |
|
|
23 |
/a(.??)(.)/8 |
/^\x{100}a\x{1234}/8 |
24 |
a\x{240}bcd |
\x{100}a\x{1234}bcd |
25 |
|
|
26 |
/a(.{3})b/8 |
/\x80/8D |
|
a\x{1234}xyb |
|
|
a\x{1234}\x{4321}yb |
|
|
a\x{1234}\x{4321}\x{3412}b |
|
|
*** Failers |
|
|
a\x{1234}b |
|
|
ac\ncb |
|
27 |
|
|
28 |
/a(.{3,})b/8 |
/\xff/8D |
|
a\x{1234}xyb |
|
|
a\x{1234}\x{4321}yb |
|
|
a\x{1234}\x{4321}\x{3412}b |
|
|
axxxxbcdefghijb |
|
|
a\x{1234}\x{4321}\x{3412}\x{3421}b |
|
|
*** Failers |
|
|
a\x{1234}b |
|
29 |
|
|
30 |
/a(.{3,}?)b/8 |
/\x{0041}\x{2262}\x{0391}\x{002e}/D8 |
31 |
a\x{1234}xyb |
\x{0041}\x{2262}\x{0391}\x{002e} |
32 |
a\x{1234}\x{4321}yb |
|
33 |
a\x{1234}\x{4321}\x{3412}b |
/\x{D55c}\x{ad6d}\x{C5B4}/D8 |
34 |
axxxxbcdefghijb |
\x{D55c}\x{ad6d}\x{C5B4} |
|
a\x{1234}\x{4321}\x{3412}\x{3421}b |
|
|
*** Failers |
|
|
a\x{1234}b |
|
35 |
|
|
36 |
/a(.{3,5})b/8 |
/\x{65e5}\x{672c}\x{8a9e}/D8 |
37 |
a\x{1234}xyb |
\x{65e5}\x{672c}\x{8a9e} |
38 |
a\x{1234}\x{4321}yb |
|
39 |
a\x{1234}\x{4321}\x{3412}b |
/\x{80}/D8 |
40 |
axxxxbcdefghijb |
|
41 |
a\x{1234}\x{4321}\x{3412}\x{3421}b |
/\x{084}/D8 |
42 |
axbxxbcdefghijb |
|
43 |
axxxxxbcdefghijb |
/\x{104}/D8 |
|
*** Failers |
|
|
a\x{1234}b |
|
|
axxxxxxbcdefghijb |
|
44 |
|
|
45 |
/a(.{3,5}?)b/8 |
/\x{861}/D8 |
46 |
a\x{1234}xyb |
|
47 |
a\x{1234}\x{4321}yb |
/\x{212ab}/D8 |
48 |
a\x{1234}\x{4321}\x{3412}b |
|
49 |
axxxxbcdefghijb |
/.{3,5}X/D8 |
50 |
a\x{1234}\x{4321}\x{3412}\x{3421}b |
\x{212ab}\x{212ab}\x{212ab}\x{861}X |
51 |
axbxxbcdefghijb |
|
52 |
axxxxxbcdefghijb |
|
53 |
|
/.{3,5}?/D8 |
54 |
|
\x{212ab}\x{212ab}\x{212ab}\x{861} |
55 |
|
|
56 |
|
/-- These tests are here rather than in testinput4 because Perl 5.6 has --/ |
57 |
|
/-- some problems with UTF-8 support, in the area of \x{..} where the --/ |
58 |
|
/-- value is < 255. It grumbles about invalid UTF-8 strings. --/ |
59 |
|
|
60 |
|
/^[a\x{c0}]b/8 |
61 |
|
\x{c0}b |
62 |
|
|
63 |
|
/^([a\x{c0}]*?)aa/8 |
64 |
|
a\x{c0}aaaa/ |
65 |
|
|
66 |
|
/^([a\x{c0}]*?)aa/8 |
67 |
|
a\x{c0}aaaa/ |
68 |
|
a\x{c0}a\x{c0}aaa/ |
69 |
|
|
70 |
|
/^([a\x{c0}]*)aa/8 |
71 |
|
a\x{c0}aaaa/ |
72 |
|
a\x{c0}a\x{c0}aaa/ |
73 |
|
|
74 |
|
/^([a\x{c0}]*)a\x{c0}/8 |
75 |
|
a\x{c0}aaaa/ |
76 |
|
a\x{c0}a\x{c0}aaa/ |
77 |
|
|
78 |
|
/-- --/ |
79 |
|
|
80 |
|
/(?<=\C)X/8 |
81 |
|
Should produce an error diagnostic |
82 |
|
|
83 |
|
/-- This one is here not because it's different to Perl, but because the --/ |
84 |
|
/-- way the captured single-byte is displayed. (In Perl it becomes a --/ |
85 |
|
/-- character, and you can't tell the difference.) --/ |
86 |
|
|
87 |
|
/X(\C)(.*)/8 |
88 |
|
X\x{1234} |
89 |
|
X\nabc |
90 |
|
|
91 |
|
/^[ab]/8D |
92 |
|
bar |
93 |
*** Failers |
*** Failers |
94 |
a\x{1234}b |
c |
95 |
axxxxxxbcdefghijb |
\x{ff} |
96 |
|
\x{100} |
97 |
|
|
98 |
|
/^[^ab]/8D |
99 |
|
c |
100 |
|
\x{ff} |
101 |
|
\x{100} |
102 |
|
*** Failers |
103 |
|
aaa |
104 |
|
|
105 |
|
/[^ab\xC0-\xF0]/8SD |
106 |
|
\x{f1} |
107 |
|
\x{bf} |
108 |
|
\x{100} |
109 |
|
\x{1000} |
110 |
|
*** Failers |
111 |
|
\x{c0} |
112 |
|
\x{f0} |
113 |
|
|
114 |
|
/Ä€{3,4}/8SD |
115 |
|
\x{100}\x{100}\x{100}\x{100\x{100} |
116 |
|
|
117 |
|
/(\x{100}+|x)/8SD |
118 |
|
|
119 |
|
/(\x{100}*a|x)/8SD |
120 |
|
|
121 |
|
/(\x{100}{0,2}a|x)/8SD |
122 |
|
|
123 |
|
/(\x{100}{1,2}a|x)/8SD |
124 |
|
|
125 |
|
/\x{100}*(\d+|"(?1)")/8 |
126 |
|
1234 |
127 |
|
"1234" |
128 |
|
\x{100}1234 |
129 |
|
"\x{100}1234" |
130 |
|
\x{100}\x{100}12ab |
131 |
|
\x{100}\x{100}"12" |
132 |
|
*** Failers |
133 |
|
\x{100}\x{100}abcd |
134 |
|
|
135 |
|
/\x{100}/8D |
136 |
|
|
137 |
|
/\x{100}*/8D |
138 |
|
|
139 |
|
/a\x{100}*/8D |
140 |
|
|
141 |
|
/ab\x{100}*/8D |
142 |
|
|
143 |
/^[a\x{c0}]/8 |
/a\x{100}\x{101}*/8D |
144 |
|
|
145 |
|
/a\x{100}\x{101}+/8D |
146 |
|
|
147 |
|
/\x{100}*A/8D |
148 |
|
A |
149 |
|
|
150 |
|
/\x{100}*\d(?R)/8D |
151 |
|
|
152 |
|
/[^\x{c4}]/D |
153 |
|
|
154 |
|
/[^\x{c4}]/8D |
155 |
|
|
156 |
|
/[\x{100}]/8DM |
157 |
|
\x{100} |
158 |
|
Z\x{100} |
159 |
|
\x{100}Z |
160 |
|
*** Failers |
161 |
|
|
162 |
|
/[Z\x{100}]/8DM |
163 |
|
Z\x{100} |
164 |
|
\x{100} |
165 |
|
\x{100}Z |
166 |
|
*** Failers |
167 |
|
|
168 |
|
/[\x{200}-\x{100}]/8 |
169 |
|
|
170 |
|
/[Ä€-Ä„]/8 |
171 |
|
\x{100} |
172 |
|
\x{104} |
173 |
*** Failers |
*** Failers |
174 |
|
\x{105} |
175 |
|
\x{ff} |
176 |
|
|
177 |
|
/[z-\x{100}]/8D |
178 |
|
|
179 |
|
/[z\Qa-d]Ä€\E]/8D |
180 |
\x{100} |
\x{100} |
181 |
|
Ä€ |
182 |
|
|
183 |
|
/[\xFF]/D |
184 |
|
>\xff< |
185 |
|
|
186 |
/(?<=aXb)cd/8 |
/[\xff]/D8 |
187 |
aXbcd |
>\x{ff}< |
188 |
|
|
189 |
/(?<=a\x{100}b)cd/8 |
/[^\xFF]/D |
|
a\x{100}bcd |
|
190 |
|
|
191 |
/(?<=a\x{100000}b)cd/8 |
/[^\xff]/8D |
192 |
a\x{100000}bcd |
|
193 |
|
/[Ä-Ü]/8 |
194 |
|
Ö # Matches without Study |
195 |
|
\x{d6} |
196 |
|
|
197 |
/(?:\x{100}){3}b/8 |
/[Ä-Ü]/8S |
198 |
\x{100}\x{100}\x{100}b |
Ö <-- Same with Study |
199 |
*** Failers |
\x{d6} |
200 |
\x{100}\x{100}b |
|
201 |
|
/[\x{c4}-\x{dc}]/8 |
202 |
|
Ö # Matches without Study |
203 |
|
\x{d6} |
204 |
|
|
205 |
|
/[\x{c4}-\x{dc}]/8S |
206 |
|
Ö <-- Same with Study |
207 |
|
\x{d6} |
208 |
|
|
209 |
|
/[Ã]/8 |
210 |
|
|
211 |
|
/Ã/8 |
212 |
|
|
213 |
|
/ÃÃÃxxx/8 |
214 |
|
|
215 |
|
/ÃÃÃxxx/8?D |
216 |
|
|
217 |
|
/abc/8 |
218 |
|
Ã] |
219 |
|
à |
220 |
|
ÃÃÃ |
221 |
|
ÃÃÃ\? |
222 |
|
|
223 |
|
/anything/8 |
224 |
|
\xc0\x80 |
225 |
|
\xc1\x8f |
226 |
|
\xe0\x9f\x80 |
227 |
|
\xf0\x8f\x80\x80 |
228 |
|
\xf8\x87\x80\x80\x80 |
229 |
|
\xfc\x83\x80\x80\x80\x80 |
230 |
|
\xfe\x80\x80\x80\x80\x80 |
231 |
|
\xff\x80\x80\x80\x80\x80 |
232 |
|
\xc3\x8f |
233 |
|
\xe0\xaf\x80 |
234 |
|
\xe1\x80\x80 |
235 |
|
\xf0\x9f\x80\x80 |
236 |
|
\xf1\x8f\x80\x80 |
237 |
|
\xf8\x88\x80\x80\x80 |
238 |
|
\xf9\x87\x80\x80\x80 |
239 |
|
\xfc\x84\x80\x80\x80\x80 |
240 |
|
\xfd\x83\x80\x80\x80\x80 |
241 |
|
|
242 |
|
/\x{100}abc(xyz(?1))/8D |
243 |
|
|
244 |
|
/[^\x{100}]abc(xyz(?1))/8D |
245 |
|
|
246 |
|
/[ab\x{100}]abc(xyz(?1))/8D |
247 |
|
|
248 |
|
/(\x{100}(b(?2)c))?/D8 |
249 |
|
|
250 |
|
/(\x{100}(b(?2)c)){0,2}/D8 |
251 |
|
|
252 |
|
/(\x{100}(b(?1)c))?/D8 |
253 |
|
|
254 |
|
/(\x{100}(b(?1)c)){0,2}/D8 |
255 |
|
|
256 |
|
/\W/8 |
257 |
|
A.B |
258 |
|
A\x{100}B |
259 |
|
|
260 |
|
/\w/8 |
261 |
|
\x{100}X |
262 |
|
|
263 |
|
/a\x{1234}b/P8 |
264 |
|
a\x{1234}b |
265 |
|
|
266 |
|
/^\ሴ/8D |
267 |
|
|
268 |
/ End of testinput5 / |
/ End of testinput5 / |