Text.find_all
find_allpatterncase_sensitivity
Group: Selections
Aliases: matches
Documentation
Finds all the matches of the regular expression pattern
in self
, returning a Vector. If not found, will be an empty Vector. For details on Enso's Regex syntax, see the Help Documentation.
Arguments
pattern
: The pattern to matchself
against.case_sensitivity
: Specifies if the text values should be compared case sensitively.
Examples
Find the substring matching the regex.
example_find_all =
## This matches `aabbbbc` @ character 0 and `abc` @ character 11
"aabbbbccccaabcaaaa".find_all "a[ab]+c"
example_find_all_insensitive =
## This matches `aABbbbc` @ character 0 and `aBC` @ character 11
"aABbbbccccaaBCaaaa".find_all "a[ab]+c" Case_Sensitivity.Insensitive
Errors
- If an empty regex is used,
find
throws anIllegal_Argument
error. - If a non-default locale is used,
find
throws anIllegal_Argument
error.