|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Fri Dec 30, 2005 4:21 pm
Tricky Pattern to match |
I need a trigger to match all these situations
Code: |
[-- -- ---] Trevayne
[41 Troll Cav/Bbr] Poe
[50 Elder Pri] Orim |
can you help me out? |
|
|
|
Iceclaw Apprentice
Joined: 11 Sep 2005 Posts: 124
|
Posted: Fri Dec 30, 2005 4:34 pm |
~[({--|%d}) ({--|%w})%s{*}~] (%w)$
Untested, but try fiddling with this. |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Fri Dec 30, 2005 5:00 pm |
no luck
|
|
|
|
luggage Novice
Joined: 20 Jul 2004 Posts: 38 Location: Australia
|
Posted: Fri Dec 30, 2005 5:36 pm |
#REGEX {[(--|\d+)\s(--\s+|\a+)\s\s(\s\s\s|\a+).(---|\a+)]\s(\w+)} {#show matched}
Try that. It worked on my system. Guessing from the above it
returns the level? race? class1 class2 playername.
Luggage
--
Regex winning out again! |
|
|
|
Slaem Apprentice
Joined: 20 Sep 2005 Posts: 135
|
Posted: Fri Dec 30, 2005 6:21 pm |
Iceclaw wrote: |
~[({--|%d}) ({--|%w})%s{*}~] (%w)$
Untested, but try fiddling with this. |
Should be
#TR {~[({--|%d}) ({--|%w})%s(*)~] (%w)} {}
and you have to enable "Wildcards in {} triggers" in Preferences. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Fri Dec 30, 2005 6:43 pm |
Fixed width patterns
#TRIGGER {(^~[(&2) (&6) (&3)?(&3)~] (%w)} {
level=%int(%1)
race=%trim("%2")
class1=%trim("%3")
class2=%trim("%4")
name="%5"
} |
|
|
|
TerrellKl Novice
Joined: 30 Aug 2005 Posts: 49
|
Posted: Fri Dec 30, 2005 10:50 pm |
Thank you very much I got it working
and I am not using it for whatever the heck you people think I am using it for |
|
|
|
|
|