//ERDDAP/com.cohort.util/ScriptString2/extractAllRegexes
extractAllRegexes
[JVM]
open fun extractAllRegexes(s: String, regex: String): Array<String>
This returns all the sections of s that match regex. It assumes that the extracted parts don't overlap. !!! Note that . in the regex doesn't match line terminators in s !!!
Return
a String[] with all the matching sections of s (or String[0] if none)
Parameters
JVM
s | the source String |
regex | the regular expression, see java.util.regex.Pattern. Note that you often want to use the "reluctant" qualifiers which match as few chars as possible (e.g., ??, *?, +?) not the "greedy" qualifiers which match as many chars as possible (e.g., ?, *, +). |
Throws
RuntimeException | if trouble |