RegEx and Special Characters guide?
Posted: Wed Jan 25, 2017 1:15 am
Hey there.
I'm a programmer and know RegEx in PHP decently enough to write some interesting RegEx, but I'm a bit tripped up on some of the syntax of the RegEx used in GINA. Is there a guide for RegEx syntax I can refer to?
As a base question for something I'm confused about, here's some regex I found on this board and modified:
This is to detect when you receive a tell, but also filters out any tells you receive that look like: (filtering out tells from your pet)
I don't understand this syntax: Why is there a colon there? Why is it not necessary when I use this to get the mob name? Also what exactly does filter for? I understand the .+ filtering for any number of characters (or no characters), but what is the mob and why is the .+ necessary? I understand that makes it not match when SOMETHING is there. Also I'm not sure why there's an escaped period here and why there's a question mark before the second \w
Anyway, a more detailed RegEx syntax guide would be helpful.
Thanks!
I'm a programmer and know RegEx in PHP decently enough to write some interesting RegEx, but I'm a bit tripped up on some of the syntax of the RegEx used in GINA. Is there a guide for RegEx syntax I can refer to?
As a base question for something I'm confused about, here's some regex I found on this board and modified:
Code: Select all
^((?:\w+\.)?\w+) (?:tells|told) you, '(?!Attacking (?<mob>.+) Master\.)
Code: Select all
XXX tells you, 'Attacking MONSTER NAME Master.'
I don't understand this syntax:
Code: Select all
(?:SOMETHING)
Code: Select all
(?<mob>.+)
Code: Select all
<mob>.+
Code: Select all
(?!SOMETHING)
Code: Select all
((?:\w+\.)?\w+)
Anyway, a more detailed RegEx syntax guide would be helpful.
Thanks!