fix repetition with ANY
This commit is contained in:
1
pike.c
1
pike.c
@@ -308,6 +308,7 @@ static int _compilecode(const char **re_loc, rcode *prog, int sizecode)
|
|||||||
case RSPLIT:
|
case RSPLIT:
|
||||||
case SAVE:
|
case SAVE:
|
||||||
case CHAR:
|
case CHAR:
|
||||||
|
case ANY:
|
||||||
i++;
|
i++;
|
||||||
icnt++;
|
icnt++;
|
||||||
}
|
}
|
||||||
|
|||||||
6
test.sh
6
test.sh
@@ -121,6 +121,8 @@ aaaaa(aa)aa(aa(a)a)?aa
|
|||||||
^\\\\.+(((/)\\\\.\\\\.+)+)?
|
^\\\\.+(((/)\\\\.\\\\.+)+)?
|
||||||
^(http|https|ftp):[/]{2}([a-zA-Z0-9\\\\\\\\.]+\\\\.[a-zA-Z]{2,4})(:[0-9]+)?/?([a-zA-Z0-9\\\\\\\\._?,'/+&%$#=~]*)
|
^(http|https|ftp):[/]{2}([a-zA-Z0-9\\\\\\\\.]+\\\\.[a-zA-Z]{2,4})(:[0-9]+)?/?([a-zA-Z0-9\\\\\\\\._?,'/+&%$#=~]*)
|
||||||
(\\\\$\\\\([a-zA-Z0-9_]+\\\\))|(([A-Za-z_%.]+):)
|
(\\\\$\\\\([a-zA-Z0-9_]+\\\\))|(([A-Za-z_%.]+):)
|
||||||
|
.{5}
|
||||||
|
.{10,15}
|
||||||
"
|
"
|
||||||
input="\
|
input="\
|
||||||
abcdef
|
abcdef
|
||||||
@@ -243,6 +245,8 @@ aaaaaaaaaaaaaaaaaaaaaaaaa
|
|||||||
../../..
|
../../..
|
||||||
https://kyryl.tk/404
|
https://kyryl.tk/404
|
||||||
OBJ = \$(SRC:.c=.o)
|
OBJ = \$(SRC:.c=.o)
|
||||||
|
рврыр
|
||||||
|
рврырdhsjhh
|
||||||
"
|
"
|
||||||
expect="\
|
expect="\
|
||||||
(0,3)
|
(0,3)
|
||||||
@@ -365,6 +369,8 @@ expect="\
|
|||||||
(0,8)(2,8)(5,8)(5,6)
|
(0,8)(2,8)(5,8)(5,6)
|
||||||
(0,20)(0,5)(8,16)(?,?)(17,20)
|
(0,20)(0,5)(8,16)(?,?)(17,20)
|
||||||
(8,12)(?,?)(8,12)(8,11)
|
(8,12)(?,?)(8,12)(8,11)
|
||||||
|
(0,10)
|
||||||
|
(0,16)
|
||||||
(0,0)
|
(0,0)
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user