Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
|||
(let ((string "I am a string"))
|
||||
(when (cl-ppcre:scan "string$" string)
|
||||
(write-line "Ends with string"))
|
||||
(unless (cl-ppcre:scan "^You" string )
|
||||
(write-line "Does not start with 'You'")))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(let* ((string "I am a string")
|
||||
(string (cl-ppcre:regex-replace " a " string " another ")))
|
||||
(write-line string))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(let ((string "I am a string"))
|
||||
(multiple-value-bind (string matchp)
|
||||
(cl-ppcre:regex-replace "\\bam\\b" string "was")
|
||||
(when matchp
|
||||
(write-line "I was able to find and replace 'am' with 'was'."))))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[1]> (regexp:match "fox" "quick fox jumps")
|
||||
#S(REGEXP:MATCH :START 6 :END 9)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
[2]> (defun regexp-replace (pat repl string)
|
||||
(reduce #'(lambda (x y) (string-concat x repl y))
|
||||
(regexp:regexp-split pat string)))
|
||||
REGEXP-REPLACE
|
||||
[3]> (regexp-replace "x\\b" "-X-" "quick foxx jumps")
|
||||
"quick fox-X- jumps"
|
||||
Loading…
Add table
Add a link
Reference in a new issue