Manual:Verbot Editor Variables and Regular Expressions

From VerbotWiki

An advanced feature of using Variable Captures in Verbots allows you to restrict what the variable capture will match to using Regular Expressions.

To use this advanced feature, simply script a normal variable in your input:

[varname]

Then, to restrict matching, place an "=" before the close sqare bracket. Finally, after the equals sign you will put the regular expression syntax you want to limit the variable to.

For example, lets say you want a variable that only accepts digits, this is how you would define the variable capture in the input:

[varname=\b"\d+"\b]

Or match to just letters: [varname=\b"[A-Za-z]+"\b]

Also, you can use Synonyms in your Regular Expressions to match to a list of words (defined in a synonym group), the syntax for this is:

[varname=\b(syn)\b]

If you are not familiar with Regular Expressions or Regex syntax, this page is a very good reference: DotNet Coders Guide to Regular Expressions (http://www.dotnetcoders.com/web/Learning/Regex/syntax.aspx)