Es regex match

From EventScripts Community Encyclopedia


Overview

Syntax: es_regex match <variable> <expression> <string>

Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Variation of this command that doesn't expand variables: es_xregex match

Description

Returns the number of characters that matched the regular expression within the string.


Parameters

  • variable - the name of the variable to store the number of characters that matched.
  • expression - a regular expression/pattern to match against
  • string -- the string to search


Examples

es_regex match myvar "!bet .* [#][a-z]+" event_var(text)


Notes

  • Regular expressions are your friend. They're complicated like any good friend should be.
  • First available in v1.3 of EventScripts.


See also

blog comments powered by Disqus