RegEx Examples

Unofficial support for the creating and editing of metas.
User avatar
Site Admin
Posts: 388

RegEx Examples

Post#1 » February 1st, 2014, 11:37 am

A Regular Expression (RegEx) is the term used to describe a codified method of searching through text.
For a tutorial on RegEx - visit

In Meta, RegEx is used to identify and react on chat messages sent or heard by your client.

The following examples may or may not work as intended, use at your own risk.

Anyone in any chat channel:
^.*().* (say|says|tells you), \"YourCommandHere\"$

Specific names in any chat channel
(^(\[[A-z]+?\] |)You|.*\<Tell:IIDString:.+:(Char2)\>.+\<\\Tell\>) (say|says|tells you), \"!yourcommandhere\"$
Simply replace "Char2" with your name within the () and separate with |
You can not copy/paste this regex, it will not transfer correctly. You must type it

Specific chat channel
\[ChannelNameHere\] (|).* (say|says), \"YourCommandHere\"$
(example: \[Allegiance\] (|).* (say|says), \"YourCommandHere\"$)

Green Messages
Simply place a ^ before the green text in your chat command. The ^ denotes that the string must begin with the first word in the text. This protects you from accidental triggers by other players.

NPC Chat
Create an All: Chat message rule.
Copy/paste the NPC text in to the Chat Message box (excluding "NPCname tells you,")
Create a NOT chat message rule and insert ^.*\s+(say|says|tells you), \".*NPCTextHere.\"$

Thanks to Tacit of MT for help with simplifying these examples.
0 x

Posts: 11

Re: RegEx Examples

Post#2 » September 4th, 2014, 7:35 pm

Here are a couple more for Virindi Chat System Pattern recognition, might come in handy.

^\[VI\] <Tell:IIDString:0:VI2:tell:(.*)>(.*)<\\Tell> tells you, ".*"$ --for vi2 tells

^\[VI\] \[<Tell:IIDString:0:VI2:tellch:Vigeneral>Vigeneral<\\Tell>\] <Tell:IIDString:0:VI2:tell:(.*)>(.*)<\\Tell> says, ".*"$ -- for Vigeneral chat

Both of these are patterns to capture all people who speak in vigeneral or send you a vi2 tell(perfect for changing colors)

^\[VI\] <Tell:IIDString:0:VI2:tell:(Char1|Char2|Char3)>(.*)<\\Tell> tells you, ".*"$ ----for tells

^\[VI\] \[<Tell:IIDString:0:VI2:tellch:Vigeneral>Vigeneral<\\Tell>\] <Tell:IIDString:0:VI2:tell:(Char1|Char2|Char3)>(.*)<\\Tell> says, ".*"$ ---for Vigeneral

These would be used if you wanted to change the color (or filter) specific people, you would simple change Char# to a person's virindi account name.

Hope this helps!
0 x

User avatar
Posts: 41

Re: RegEx Examples

Post#3 » February 14th, 2015, 3:33 am

A list of shortened Regex lines and use descriptions:

((\<Tell:.{9}:[0-9]+:(Char|List|Here)\>.+)|^(\[[A-z]+\] )?You) (think|tells you|says?), \"Your Command Here\"$ -any auth in any channel OR You

^\[Fellowship\] ((\<Tell:.{9}:[0-9]+:(Char|List|Here)\>.+)|You) says?, \"Your Command Here\"$ -any auth in Fellow OR You

^\[Fellowship\].+says?, \"Your Command Here\"$ -anyone in fellow

^\<Tell:.{9}:[0-9]+:(Char|List|Here)\>.+ tells you, \"Your Command Here\"$ -any auth Tell

Please let me know if you find problems!

Updated: Mar 23 2015 1852 EST
0 x

Return to “VT: Meta Support”

Who is online

Users browsing this forum: No registered users and 2 guests

Login  •  Register