Depending on the complexity of the task, you can use regular expressions. If you download CL-PPCRE , you can write:
(ppcre:scan "^[ a-zA-Z]*$" "Coffee is Friend")
The regular expression accepted by the library is a Perl-like string or parsing tree. For example, a call (ppcre:parse-string "^[ a-zA-Z]*$") gives:
(:SEQUENCE :START-ANCHOR (:GREEDY-REPETITION 0 NIL (:CHAR-CLASS
The above form has its uses when you need to combine regular expressions, because it is much simpler than concatenating and escaping strings.
coredump
source share