Commit | Line | Data |
---|---|---|
599cee73 PM |
1 | regcomp.c AOK |
2 | ||
767a6a26 PM |
3 | Strange *+?{} on zero-length expression [S_study_chunk] |
4 | /(?=a)?/ | |
599cee73 | 5 | |
767a6a26 | 6 | %.*s matches null string many times [S_regpiece] |
599cee73 PM |
7 | $a = "ABC123" ; $a =~ /(?=a)*/' |
8 | ||
ac561586 | 9 | /%.127s/: Unrecognized escape \\%c passed through [S_regatom] |
e476b1b5 | 10 | $x = '\m' ; /$x/ |
599cee73 | 11 | |
ac561586 JH |
12 | Character class [:%.*s:] unknown [S_regpposixcc] |
13 | ||
767a6a26 PM |
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 JH |
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 PM |
27 | my $a = "ABC123" ; |
28 | $a =~ /(?=a)*/ ; | |
e476b1b5 | 29 | no warnings 'regexp' ; |
0453d815 | 30 | $a =~ /(?=a)*/ ; |
599cee73 PM |
31 | EXPECT |
32 | (?=a)* matches null string many times at - line 4. | |
33 | ######## | |
767a6a26 | 34 | # regcomp.c [S_study_chunk] |
e476b1b5 | 35 | use warnings 'regexp' ; |
599cee73 PM |
36 | $_ = "" ; |
37 | /(?=a)?/; | |
e476b1b5 | 38 | no warnings 'regexp' ; |
0453d815 | 39 | /(?=a)?/; |
599cee73 PM |
40 | EXPECT |
41 | Strange *+?{} on zero-length expression at - line 4. | |
42 | ######## | |
767a6a26 | 43 | # regcomp.c [S_regatom] |
e476b1b5 GS |
44 | $x = '\m' ; |
45 | use warnings 'regexp' ; | |
46 | $a =~ /a$x/ ; | |
47 | no warnings 'regexp' ; | |
48 | $a =~ /a$x/ ; | |
767a6a26 | 49 | EXPECT |
e476b1b5 | 50 | /a\m/: Unrecognized escape \m passed through at - line 4. |
767a6a26 PM |
51 | ######## |
52 | # regcomp.c [S_regpposixcc S_checkposixcc] | |
032dc9da | 53 | BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 } |
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:]/; |
4b19af01 | 62 | /[[:zog:]]/; |
599cee73 | 63 | EXPECT |
032dc9da | 64 | Character class syntax [: :] belongs inside character classes at - line 5. |
4b19af01 CB |
65 | Character class syntax [: :] belongs inside character classes at - line 6. |
66 | Character class [:zog:] unknown at - line 7. | |
67 | ######## | |
68 | # regcomp.c [S_checkposixcc] | |
69 | BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 } | |
70 | use warnings 'regexp' ; | |
71 | $_ = "" ; | |
72 | /[.zog.]/; | |
73 | no warnings 'regexp' ; | |
74 | /[.zog.]/; | |
75 | EXPECT | |
76 | Character class syntax [. .] belongs inside character classes at - line 5. | |
77 | Character class syntax [. .] is reserved for future extensions at - line 5. | |
78 | ######## | |
79 | # regcomp.c [S_checkposixcc] | |
80 | BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 } | |
81 | use warnings 'regexp' ; | |
82 | $_ = "" ; | |
83 | /[[.zog.]]/; | |
84 | no warnings 'regexp' ; | |
85 | /[[.zog.]]/; | |
86 | EXPECT | |
87 | Character class syntax [. .] is reserved for future extensions at - line 5. | |
73b437c8 JH |
88 | ######## |
89 | # regcomp.c [S_regclass] | |
90 | $_ = ""; | |
e476b1b5 | 91 | use warnings 'regexp' ; |
73b437c8 JH |
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 JH |
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 | |
112 | /[a-\d]/: false [] range "a-\d" in regexp at - line 5. | |
113 | /[\d-b]/: false [] range "\d-" in regexp at - line 6. | |
114 | /[\s-\d]/: false [] range "\s-" in regexp at - line 7. | |
115 | /[\d-\s]/: false [] range "\d-" in regexp at - line 8. | |
116 | /[a-[:digit:]]/: false [] range "a-[:digit:]" in regexp at - line 9. | |
117 | /[[:digit:]-b]/: false [] range "[:digit:]-" in regexp at - line 10. | |
118 | /[[:alpha:]-[:digit:]]/: false [] range "[:alpha:]-" in regexp at - line 11. | |
119 | /[[:digit:]-[:alpha:]]/: false [] range "[:digit:]-" in regexp at - line 12. | |
120 | ######## | |
121 | # regcomp.c [S_regclassutf8] | |
59af8754 GS |
122 | BEGIN { |
123 | if (ord("\t") == 5) { | |
124 | print "SKIPPED\n# ebcdic regular expression ranges differ."; | |
125 | exit 0; | |
126 | } | |
127 | } | |
73b437c8 JH |
128 | use utf8; |
129 | $_ = ""; | |
e476b1b5 | 130 | use warnings 'regexp' ; |
73b437c8 JH |
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 JH |
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 | |
dc26be07 GS |
151 | /[a-\d]/: false [] range "a-\d" in regexp at - line 12. |
152 | /[\d-b]/: false [] range "\d-" in regexp at - line 13. | |
153 | /[\s-\d]/: false [] range "\s-" in regexp at - line 14. | |
154 | /[\d-\s]/: false [] range "\d-" in regexp at - line 15. | |
155 | /[a-[:digit:]]/: false [] range "a-[:digit:]" in regexp at - line 16. | |
156 | /[[:digit:]-b]/: false [] range "[:digit:]-" in regexp at - line 17. | |
157 | /[[:alpha:]-[:digit:]]/: false [] range "[:alpha:]-" in regexp at - line 18. | |
158 | /[[:digit:]-[:alpha:]]/: false [] range "[:digit:]-" in regexp at - line 19. | |
1028017a JH |
159 | ######## |
160 | # regcomp.c [S_regclass S_regclassutf8] | |
e476b1b5 | 161 | use warnings 'regexp' ; |
1028017a | 162 | $a =~ /[a\zb]/ ; |
e476b1b5 | 163 | no warnings 'regexp' ; |
1028017a JH |
164 | $a =~ /[a\zb]/ ; |
165 | EXPECT | |
166 | /[a\zb]/: Unrecognized escape \z in character class passed through at - line 3. |