RosettaCodeData/Task/Regular-expressions/Common-Lisp/regular-expressions-3.lisp
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

5 lines
215 B
Common Lisp

(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'."))))