Sv RegexMatch
From GECK
A function added by the JIP NVSE Plugin.
Contents
Description
Returns whether the specified string_var matches the specified Regular Expression pattern.
Syntax
(match:0/1) sv_RegexMatch targetSeq:string_var regEx:formattedString formatVars(up to 20)
Example
let sTargetSeq := "Whatchamacallit" let bMatch := sv_RegexMatch sTargetSeq "(What)(.*)"
In the above example, sTargetSeq does begin with the sequence "What", therefore bMatch equals 1.
Notes
- regEx supports string formatting, and up to 20 variables may be used.
- Will crash the game if the Regex pattern is invalidly formatted. If it cannot be verified before the script runs, use ValidateRegex.
See Also
- sv_RegexSearch
- sv_RegexReplace
- To test Regex expressions, consider using this website: Regex101