Fixing bug in regexp \P
parent
1d5e5d00f1
commit
88e88207ff
|
@ -133,7 +133,7 @@ CharacterInBracket = !("}") Character
|
|||
QuotedCharacter = !("\\E") .
|
||||
|
||||
Escape = "p{" CharacterInBracket*:s "}" => [[ s name>class <primitive-class> ]]
|
||||
| "P{" CharacterInBracket*:s "}" => [[ s name>class <primitive-class> <negation> ]]
|
||||
| "P{" CharacterInBracket*:s "}" => [[ s name>class <primitive-class> <not-class> ]]
|
||||
| "Q" QuotedCharacter*:s "\\E" => [[ s <concatenation> ]]
|
||||
| "u" Character:a Character:b Character:c Character:d
|
||||
=> [[ { a b c d } hex> ensure-number ]]
|
||||
|
|
|
@ -530,3 +530,8 @@ IN: regexp-tests
|
|||
[ f ] [ "π" R/ [\p{script=latin}--\p{lower}]/ matches? ] unit-test
|
||||
[ t ] [ "A" R/ [\p{script=latin}--\p{lower}]/ matches? ] unit-test
|
||||
[ f ] [ "3" R/ [\p{script=latin}--\p{lower}]/ matches? ] unit-test
|
||||
|
||||
[ t ] [ " " R/ \P{alpha}/ matches? ] unit-test
|
||||
[ f ] [ "" R/ \P{alpha}/ matches? ] unit-test
|
||||
[ f ] [ "a " R/ \P{alpha}/ matches? ] unit-test
|
||||
[ f ] [ "a" R/ \P{alpha}/ matches? ] unit-test
|
||||
|
|
Loading…
Reference in New Issue