first-match ( string regexp -- slice/f )
Regular expressions ยป Matching operations with regular expressions

Prev:re-contains? ( string regexp -- ? )
Next:first-match-with-captures ( string regexp -- match/f )


Vocabulary
regexp

Inputs
stringa string
regexpa regexp


Outputs
slice/fthe match, if one exists


Word description
Finds the first match of the regular expression in the string, and returns it as a slice. If there is no match, then f is returned.

Definition