|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Fri Oct 09, 2009 4:37 pm
need some trigger help |
so i was never able to get this to work correctly even in zmud
the mud i play will return something like this
Code: |
Level: 119 Holy mirror N/A
Shockproof N/A |
so i decided to use this trigger %s(*)%sN/A to capture it to a var, and the outcome is something along this line 119 Holy mirror
cept i dont want the level of the spell to show up, is there a way to truncate this? |
|
|
|
Yodous Apprentice
Joined: 23 Jun 2004 Posts: 105 Location: Poland
|
Posted: Fri Oct 09, 2009 5:06 pm |
? :>
|
|
|
|
Xarsas Beginner
Joined: 05 Mar 2008 Posts: 16
|
Posted: Thu Oct 15, 2009 7:02 pm |
#REGEX {\w+:\s*\d*\s*(\w+\s*\w*)\s*N/A} {var=%1}
or possibly
#REGEX {\w+:\s*\d*\s*(.*)\s*N/A} {var=%1}
the top one will match up to two words with a space between, the bottom will match anything between 119 and N/A(including numbers)
probably not the slickest way to do it but should work fine |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Fri Oct 16, 2009 12:36 am |
#REGEX {(?:Level:\s+\d+\s|\s{11})(.+)\s+N\/A} {blah blah blah}
That will match it if it's Level: 119 or just the spaces in front.
Charneus
Edited to allow for extra spaces between the colon and the level. Forget if there is a space after Level or not. Correct that part as needed. |
|
|
|
|
|