Skip to main content

Module regex

Module regex 

Source
Expand description

Regular expressions (rust regex crate under the hood).

(re-match? PATTERN STR) → bool (re-find PATTERN STR) → first match as string, or nil (re-find-all PATTERN STR) → list of match strings (re-captures PATTERN STR) → list of capture groups for first match (returns nil if no match) (re-replace PATTERN STR REPL) → every match replaced; $1/$2… refer to capture groups in REPL (re-split PATTERN STR) → STR split on every PATTERN match

Functions§

install