cl-ppcre
cl-ppcre copied to clipboard
Common Lisp regular expression library
Replaced all keyword arguments with uninterned symbols in DEFPACKAGE and IN-PACKAGE. This should reduce pollution of namespace and enable consistent highlighting in editors.
Using 35c5266061d365afc78d9640e9e17c3f891fea91, I can see that registers within repetitions are not correctly returned: ``` lisp (cl-ppcre:scan-to-strings "(?:\\s+(\\w+)=(\\w+))*" " a1=A13 a2=A2 ") " a1=A13 a2=A2" #("a2" "A2") ``` I would have...
Since there's currently an all-matches-as-strings function which returns a list of all matches, but no function that directly returns both the matches and the group/scan matches as strings in the...
This is my (defun testreg (trojan) (ppcre:register-groups-bind (first second third fouth fifth sixth seventh eighth ninth tenth eleventh twelfth) ("^(?:(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9)|(a)|(b)|(c))+$" trojan) (remove nil (list first second third fouth fifth sixth...
Available since v2.27. This makes it easier to inspect an ASDF system from a different implementation which is done in Clasp's builder.
Subpattern references enable the matching of self-similar strings by way of recursion. Unlike backreferences, which refer to the string matched by a register, subpattern references refer to the pattern contained...
I often have to generate regexes dynamically. For this the tree syntax of CL-PPCRE is the most optimal solution. However I have discovered a strange corner case. In the documentation...
It would be nice if branch reset patterns were supported. ``` CL-USER> (scan-to-strings "(?|(abc)|(123))" "abcdef") "abc" #("abc") CL-USER> (scan-to-strings "(?|(abc)|(123))" "123456") "123" #("123") ``` instead of the default behaviour: ```...
I would like to have a register-group-bind like macro for replacing all the regex occurrences in a string. It would be something like: replace-register-groups var-list (regex target-string &key start end...
CL-PPCRE validates register names too early in the regex compilation phase. The converter should wait until it has seen all register names before asserting that named back-references refer to existing...