You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filip Halas edited this page Apr 3, 2014
·
8 revisions
Gomatch uses tokens as a semantic reference to regular expressions. Gomatch comes with some predefined in ./Tokens file, location of this file can be changed via the flag -t.
The contents of file with Tokens can be:
Token = name + space + regex. Example: USERNAME ^[a-zA-Z0-9_-]+$.
One token per line.
Single line comments starting with # or empty lines.
Referencing a token
To reference USERNAME (declared above) when writing pattern/event use <USERNAME> or <USERNAME:semantic_name>.
The syntax of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages. More precisely, it is the syntax accepted by RE2 and described at http://code.google.com/p/re2/wiki/Syntax, except for \C.