MoneyWorks Manual
Regex_Search (string, regex [, startOffset])
Result Type: Number
Definition: Returns the 1-based position in the string where the first match for the given regular expression is found, or 0 if there is no match. To find additional matches, you can specify a 1-based offset specifying which character to start searching from. The result will still be an offset from the start of the string.
Examples: Regex_Search("Some 45 text 876335 more text", " [0-9]{5}")
returns 13 (the regex matches a space followed by at least 5 digits).
Availability: v9 and later.
See Also:
Dice: Get a subcomponent of a delimited tabular string
Head: Get some elements from the start of a delimited string
Left: Get characters from the start of a string
Mid: Get characters from the middle of a string
Regex_GetMatches: Find tokens using a regular expression
Regex_Match: Test whether a string matches a regular expression
Regex_Replace: Replace text in a string using a regular expression
Regex_SearchStr: Find the first match of a regular expression in a string and return the matching string
RemoveLeading: Remove characters from the start of a string
RemoveTrailing: Remove characters from the end of a string
Replace: Replace matching text in a string with new text
Right: Get characters from the end of a string
Slice: Get a component of a delimited string
Tail: Get some elements from the end of a delimited string
Trim: Remove whitespace from beginning and end of a string