Last active
July 22, 2020 22:53
-
-
Save Jach/cf91e6cbbade7e1801b44f919a15d499 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(ql:quickload :cl-ppcre) | |
;(ql:quickload :cl-interpol) | |
;(named-readtables:in-readtable :interpol-syntax) | |
(defun full-match (pattern string) | |
"Something like Python's re.fullmatch. | |
Example (with cl-interpol): | |
(full-match #?/\s/ #?' ') -> T | |
(full-match #?/\s/ #?'') -> nil" | |
(equal string (cl-ppcre:scan-to-strings pattern string))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment