Commit | Line | Data |
599cee73 |
1 | regcomp.c AOK |
2 | |
767a6a26 |
3 | Strange *+?{} on zero-length expression [S_study_chunk] |
4 | /(?=a)?/ |
599cee73 |
5 | |
767a6a26 |
6 | %.*s matches null string many times [S_regpiece] |
599cee73 |
7 | $a = "ABC123" ; $a =~ /(?=a)*/' |
8 | |
ac561586 |
9 | /%.127s/: Unrecognized escape \\%c passed through [S_regatom] |
e476b1b5 |
10 | $x = '\m' ; /$x/ |
599cee73 |
11 | |
ac561586 |
12 | Character class [:%.*s:] unknown [S_regpposixcc] |
13 | |
767a6a26 |
14 | Character class syntax [%c %c] belongs inside character classes [S_checkposixcc] |
15 | |
73b437c8 |
16 | /%.127s/: false [] range \"%*.*s\" in regexp [S_regclass] |
599cee73 |
17 | |
73b437c8 |
18 | /%.127s/: false [] range \"%*.*s\" in regexp [S_regclassutf8] |
599cee73 |
19 | |
1028017a |
20 | /%.127s/: Unrecognized escape \\%c in character class passed through" [S_regclass] |
21 | |
22 | /%.127s/: Unrecognized escape \\%c in character class passed through" [S_regclassutf8] |
23 | |
599cee73 |
24 | __END__ |
767a6a26 |
25 | # regcomp.c [S_regpiece] |
e476b1b5 |
26 | use warnings 'regexp' ; |
599cee73 |
27 | my $a = "ABC123" ; |
28 | $a =~ /(?=a)*/ ; |
e476b1b5 |
29 | no warnings 'regexp' ; |
0453d815 |
30 | $a =~ /(?=a)*/ ; |
599cee73 |
31 | EXPECT |
79eeca27 |
32 | (?=a)* matches null string many times before HERE mark in regex m/(?=a)* << HERE / at - line 4. |
599cee73 |
33 | ######## |
767a6a26 |
34 | # regcomp.c [S_study_chunk] |
e476b1b5 |
35 | use warnings 'regexp' ; |
599cee73 |
36 | $_ = "" ; |
37 | /(?=a)?/; |
e476b1b5 |
38 | no warnings 'regexp' ; |
0453d815 |
39 | /(?=a)?/; |
599cee73 |
40 | EXPECT |
79eeca27 |
41 | Quantifier unexpected on zero-length expression before HERE mark in regex m/(?=a)? << HERE / at - line 4. |
599cee73 |
42 | ######## |
767a6a26 |
43 | # regcomp.c [S_regatom] |
e476b1b5 |
44 | $x = '\m' ; |
45 | use warnings 'regexp' ; |
46 | $a =~ /a$x/ ; |
47 | no warnings 'regexp' ; |
48 | $a =~ /a$x/ ; |
767a6a26 |
49 | EXPECT |
79eeca27 |
50 | Unrecognized escape \m passed through before HERE mark in regex m/a\m << HERE / at - line 4. |
767a6a26 |
51 | ######## |
52 | # regcomp.c [S_regpposixcc S_checkposixcc] |
7f01dc7a |
53 | # |
e476b1b5 |
54 | use warnings 'regexp' ; |
599cee73 |
55 | $_ = "" ; |
e8c223df |
56 | /[:alpha:]/; |
e8c223df |
57 | /[:zog:]/; |
ac561586 |
58 | /[[:zog:]]/; |
e476b1b5 |
59 | no warnings 'regexp' ; |
e8c223df |
60 | /[:alpha:]/; |
ac561586 |
61 | /[:zog:]/; |
3802429d |
62 | /[[:zog:]]/; |
599cee73 |
63 | EXPECT |
79eeca27 |
64 | POSIX syntax [: :] belongs inside character classes before HERE mark in regex m/[:alpha:] << HERE / at - line 5. |
65 | POSIX syntax [: :] belongs inside character classes before HERE mark in regex m/[:zog:] << HERE / at - line 6. |
66 | POSIX class [:zog:] unknown before HERE mark in regex m/[[:zog:] << HERE ]/ |
3802429d |
67 | ######## |
68 | # regcomp.c [S_checkposixcc] |
7f01dc7a |
69 | # |
3802429d |
70 | use warnings 'regexp' ; |
71 | $_ = "" ; |
72 | /[.zog.]/; |
73 | no warnings 'regexp' ; |
74 | /[.zog.]/; |
75 | EXPECT |
79eeca27 |
76 | POSIX syntax [. .] belongs inside character classes before HERE mark in regex m/[.zog.] << HERE / at - line 5. |
77 | POSIX syntax [. .] is reserved for future extensions before HERE mark in regex m/[.zog.] << HERE / |
3802429d |
78 | ######## |
79 | # regcomp.c [S_checkposixcc] |
7f01dc7a |
80 | # |
3802429d |
81 | use warnings 'regexp' ; |
82 | $_ = "" ; |
83 | /[[.zog.]]/; |
84 | no warnings 'regexp' ; |
85 | /[[.zog.]]/; |
86 | EXPECT |
79eeca27 |
87 | POSIX syntax [. .] is reserved for future extensions before HERE mark in regex m/[[.zog.] << HERE ]/ |
73b437c8 |
88 | ######## |
89 | # regcomp.c [S_regclass] |
90 | $_ = ""; |
e476b1b5 |
91 | use warnings 'regexp' ; |
73b437c8 |
92 | /[a-b]/; |
93 | /[a-\d]/; |
94 | /[\d-b]/; |
95 | /[\s-\d]/; |
96 | /[\d-\s]/; |
97 | /[a-[:digit:]]/; |
98 | /[[:digit:]-b]/; |
99 | /[[:alpha:]-[:digit:]]/; |
100 | /[[:digit:]-[:alpha:]]/; |
e476b1b5 |
101 | no warnings 'regexp' ; |
73b437c8 |
102 | /[a-b]/; |
103 | /[a-\d]/; |
104 | /[\d-b]/; |
105 | /[\s-\d]/; |
106 | /[\d-\s]/; |
107 | /[a-[:digit:]]/; |
108 | /[[:digit:]-b]/; |
109 | /[[:alpha:]-[:digit:]]/; |
110 | /[[:digit:]-[:alpha:]]/; |
111 | EXPECT |
79eeca27 |
112 | False [] range "a-\d" before HERE mark in regex m/[a-\d << HERE ]/ at - line 5. |
113 | False [] range "\d-" before HERE mark in regex m/[\d- << HERE b]/ at - line 6. |
114 | False [] range "\s-" before HERE mark in regex m/[\s- << HERE \d]/ at - line 7. |
115 | False [] range "\d-" before HERE mark in regex m/[\d- << HERE \s]/ at - line 8. |
116 | False [] range "a-[:digit:]" before HERE mark in regex m/[a-[:digit:] << HERE ]/ at - line 9. |
117 | False [] range "[:digit:]-" before HERE mark in regex m/[[:digit:]- << HERE b]/ at - line 10. |
118 | False [] range "[:alpha:]-" before HERE mark in regex m/[[:alpha:]- << HERE [:digit:]]/ at - line 11. |
119 | False [] range "[:digit:]-" before HERE mark in regex m/[[:digit:]- << HERE [:alpha:]]/ at - line 12. |
73b437c8 |
120 | ######## |
121 | # regcomp.c [S_regclassutf8] |
59af8754 |
122 | BEGIN { |
123 | if (ord("\t") == 5) { |
124 | print "SKIPPED\n# ebcdic regular expression ranges differ."; |
125 | exit 0; |
126 | } |
127 | } |
73b437c8 |
128 | use utf8; |
129 | $_ = ""; |
e476b1b5 |
130 | use warnings 'regexp' ; |
73b437c8 |
131 | /[a-b]/; |
132 | /[a-\d]/; |
133 | /[\d-b]/; |
134 | /[\s-\d]/; |
135 | /[\d-\s]/; |
136 | /[a-[:digit:]]/; |
137 | /[[:digit:]-b]/; |
138 | /[[:alpha:]-[:digit:]]/; |
139 | /[[:digit:]-[:alpha:]]/; |
e476b1b5 |
140 | no warnings 'regexp' ; |
73b437c8 |
141 | /[a-b]/; |
142 | /[a-\d]/; |
143 | /[\d-b]/; |
144 | /[\s-\d]/; |
145 | /[\d-\s]/; |
146 | /[a-[:digit:]]/; |
147 | /[[:digit:]-b]/; |
148 | /[[:alpha:]-[:digit:]]/; |
149 | /[[:digit:]-[:alpha:]]/; |
150 | EXPECT |
79eeca27 |
151 | False [] range "a-\d" before HERE mark in regex m/[a-\d << HERE ]/ at - line 12. |
152 | False [] range "\d-" before HERE mark in regex m/[\d- << HERE b]/ at - line 13. |
153 | False [] range "\s-" before HERE mark in regex m/[\s- << HERE \d]/ at - line 14. |
154 | False [] range "\d-" before HERE mark in regex m/[\d- << HERE \s]/ at - line 15. |
155 | False [] range "a-[:digit:]" before HERE mark in regex m/[a-[:digit:] << HERE ]/ at - line 16. |
156 | False [] range "[:digit:]-" before HERE mark in regex m/[[:digit:]- << HERE b]/ at - line 17. |
157 | False [] range "[:alpha:]-" before HERE mark in regex m/[[:alpha:]- << HERE [:digit:]]/ at - line 18. |
158 | False [] range "[:digit:]-" before HERE mark in regex m/[[:digit:]- << HERE [:alpha:]]/ at - line 19. |
1028017a |
159 | ######## |
160 | # regcomp.c [S_regclass S_regclassutf8] |
e476b1b5 |
161 | use warnings 'regexp' ; |
1028017a |
162 | $a =~ /[a\zb]/ ; |
e476b1b5 |
163 | no warnings 'regexp' ; |
1028017a |
164 | $a =~ /[a\zb]/ ; |
165 | EXPECT |
79eeca27 |
166 | Unrecognized escape \z in character class passed through before HERE mark in regex m/[a\z << HERE b]/ at - line 3. |
b45f050a |
167 | |