|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Jan 18, 2006 9:41 pm
Silly Trigger Match question |
Trigger body
#ADDITEM ClanMembers %1
#ADDITEM ClanRank "%2"
#ADDITEM ClanClass %3
#ADDITEM ClanRace %4
Code: |
30 Vitae Family Commoner 137 Warrior Half-griff 18 Jan 2006 |
Triggers:
%s%d%s(%w)%s(%w)%s%d%s(%w)%s(%w)*
fails to capture anything
%s%d%s(%w)%s(%*)%s%d%s(%w)%s(%w)*
%s%d%s(%w)%s(*)%s%d%s(%w)%s(%w)*
Both capture the text as well as the spaces after it up to the Level (in my example above, the 137) so it looks like this
%s%d%s(%w)%s({%w|%w %w})%s%d%s(%w)%s(%w)*
Works perfectly
but since each clan is different and can have 3 or 4 or 5 (or maybe more, dunno) words, it winds up looking like this
%s%d%s(%w)%s({%w|%w %w|%w %w %w|%w %w %w %w|%w %w %w %w %w})%s%d%s(%w)%s(%w)*
which as far as I am concerned is ugly as hell.
I'm sure there's another way but at this moment it eludes me.
Help? |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Wed Jan 18, 2006 11:12 pm |
Might be able to use Fixed width pattern matching with %trim %int possibly %word. Unless you show multiple examples and explain explicity what you want captured to where then it will be harder to make an acurate trigger
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Jan 18, 2006 11:22 pm |
Actually, you can use the range pattern-matching system. You need to enable wildcards in stringlists in Preferences, though.
[%w%s]
That will match any number of words and whitespace, perhaps including the boundary words that have punctuation tacked on the end. Like the word "end" at the end of the previous sentence. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Jan 18, 2006 11:42 pm |
Vitae I've got you covered. Use the following Perl regular expression as your pattern and you should be good.
Code: |
\s+\d+\s+(\w+)\s+((\w+ )+)\s+\d+\s+(\w+)\s+(\w+(-\w+)?)\s+\d+\s+\w+\s+\d+ |
For example:
Code: |
#REGEX {\s+\d+\s+(\w+)\s+((\w+ )+)\s+\d+\s+(\w+)\s+(\w+(-\w+)?)\s+\d+\s+\w+\s+\d+}
{#ADDITEM ClanMembers %1
#ADDITEM ClanRank "%2"
#ADDITEM ClanClass %4
#ADDITEM ClanRace %5 }
|
Alternatively you can just paste it into your current trigger and be sure to specify Perl regular expression. Also note the change match values. I tweaked it to make sure it didn't care if the class name had a hyphen
If you have trouble following it, let me know and I'll to explain it. I like the Perl regex because you have even more power and control than in zMUD.
Depending on your output you could also do something with a fixed width and the %trim function.
Edit: For grammer purposes |
|
_________________ Asati di tempari!
Last edited by Tech on Wed Jan 18, 2006 11:46 pm; edited 1 time in total |
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Wed Jan 18, 2006 11:43 pm |
Honestly, this could quickly turn into a very complex trigger. I would suggest using REGEX if possible.
I know it's a bit much, but it will allow for you to specify exactly what you're looking for.
A few notes:
- I used trim to cut out the trailing whitespace on "Family Commoner".
- This allows for unlimited words listed as a clanrank. You can follow the same example if you need it for race and class.
- Using #ADDITEM does not store repeated items in a stringlist. This may be a problem if you are trying to keep them as placeholders to correspond to a person, so I used %additem instead.
- To handle clanrace, you'll need to include the - as it is only looking for letters, not special characters.
Here is my suggestion:
Code: |
#REGEX {^\s\d*\s(\a*)\s*([a-zA-Z\s]*)\d*\s(\a*)\s*([a-zA-Z\-]*).*} {
#VAR ClanMembers %ADDITEM( %1, @ClanMembers)
#VAR ClanRank %ADDITEM( %trim( "%2"), @ClanRank)
#VAR ClanClass %ADDITEM( %3, @ClanClass)
#VAR ClanRace %ADDITEM( %4, @ClanRace)
} |
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Jan 18, 2006 11:57 pm |
Pseudo's code is cleaner... so I suggest using his instead. His is also a tighter match although.
Note: There are some assumptions in his regex about spacing and I would change the '\d*' to '\d+'; although for your stuff it probably wouldn't make a difference. |
|
_________________ Asati di tempari! |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 19, 2006 3:00 am |
Sorry, didn't think about posting extra stuff since my only question was how to get it to not add the spaces and not look ugly at the same time.
Here's some extras from my clan and a few others so some more diffs can be seen
Code: |
29 Vampirella Family Commoner 125 Psionicist Half-griff 03 Jan 2006
30 Vitae Family Commoner 137 Warrior Half-griff 18 Jan 2006
31 Vivi Family Soldier 30 Paladin Ratling 17 Jul 2005
9 Hudsen Mestere-Lacatuchi 122 Warrior Half-griff 05 Sep 2005
2 Arist Ataman 201 Mage Human 18 Jan 2006
67 Zolin Master of Guidance 127 Mage Vampire 18 Jan 2006 |
Again my only question (at least at this moment) is how to get the clan rank (thing after names like Vampirella and Vitae etc) to show without the spaces in additem part, and not to look butt ugly with the %w|%w %w| stuff. (not that regex dont look butt ugly to me in the 1st place and since it's not understandable by me, i might wind up with the %w|%w %w stuff..
In the end, what i want is for it to add up each rank and display a total for each type. Something like this
Family Commoner - 15
Family Soldier - 5
Family Sergeant - 4
Family Commander - 4
Imperial Heiress - 1
Imperial Lady - 1
Imperial Lord - 1
The ranks will be defined seperately from here:
Code: |
claninfo
Clan Name: [ Clan Imperium ]
------------------------------------------------------------------
Leaders : [ Majic ] [ None ] Members : [ 31 ]
[ Hsif ] [ None ] Tax Rate : [ 0 ]
[ None ] Min Level: [ 200 ]
Deity : [ Paladine ]
------------------------------------------------------------------
Male Rankings Female Rankings
[ Family Commoner ] [ Family Commoner ]
[ Family Soldier ] [ Family Soldier ]
[ Family Sergeant ] [ Family Sergeant ]
[ Family Commander ] [ Family Commander ]
[ Imperial Duke ] [ Imperial Duchess ]
[ Imperial Noble ] [ Imperial Heiress ]
[ Imperial Lord ] [ Imperial Lady ]
------------------------------------------------------------------
Clan Recall? : [Y] Clan Donate Room ?: [Y]
Clan Death Recall? : [Y] Clan Jail? : [Y]
Clan Morgue? : [Y] Clan Skill? : [Dragonlance]
[Oath]
Web Page : www.clanimperium.net
Public Hall: {Run Sd} |
Getting the ranks and storing them is nothing more than a trigger from
Male Rankings Female Rankings
down to
------------------------------------------------------------------
since I might run this for different clans.
And then a feed from the roster to add a +1 to them
But due to the spaces the counts could be off as seen by the diffs in spaces from ranks to levels. As I said, if the easier way is just to use the %w|%w %w| method then so be it. just wanted to see another way of doing things. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Thu Jan 19, 2006 1:51 pm Re: Silly Trigger Match question |
Fixed width pattern, I would suggest using either a Data Record, or the Database Module in Zmud to store the stuff.
Code: |
#TRIGGER {^ (&2) (&12) (&20) (&3) (&10) (&10)} {
#SAY Now that I have a working trigger I can work on storing values
} |
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 19, 2006 3:29 pm |
umm...what fixed width? There's pretty much no fixed width anywhere in what I am looking for.
|
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Thu Jan 19, 2006 6:06 pm |
Of course it is, that's why you've used the board code display in order to show the spaces and how it is laid out.
So do an alias to turn on the fixed width trigger and issue the command and the last line will be a trigger to turn the fixed width trigger off. It will work very well. |
|
_________________ Taz :) |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 19, 2006 6:28 pm |
Tried:
\s+\d+\s+(\w+)\s+((\w+ )+)\s+\d+\s+(\w+)\s+(\w+(-\w+)?)\s+\d+\s+\w+\s+\d+
Looks good, but adds one space after the Ranks
^\s\d+\s(\a*)\s*([a-zA-Z\s]*)\d+\s(\a*)\s*([a-zA-Z\-]*).*
ummmmm....weirdness...Like I'd said after this suggestion, I only want a counter for them, so %additem does not matter. So i changed it up to this
#ADDITEM ClanMembers %1
#ADDITEM ClanRank %trim( "%2")
#ADDITEM ClanClass %3
#ADDITEM ClanRace %5
ClanClass: the 1st 9 on here are clan members...
Anipopo|Ashkelon|Azaeric|Brenden|Bunnie|Chrysta|Chuft|Cougr|CuChulainn|Thief|Mage|Ranger|Warrior|Cleric|Psionicist|Paladin
ClanMembers:
Clan||Dmg|Doa|Dolt|Feihulong|Fiendish|Haunter|Hsif|Jackson|Jaegar|Jaenelle|Kelst|Kessel|Lise|Majic|Mordekain|Pyramus|Shakia|Tenar|Valynn|Vampirella|Vitae|Vivi
ClanRace:
-|Family|Vampire|Sprite|Eldar|Dwarf|Triton|Human|Half-griff|Elf|Wolfen|Ratling|
ClanRank:
roster for Clan Imperium||Family Commoner|Family Sergeant|Family Soldier|Imperial Lord|Family Commander|Imperial Lady|Imperial Heiress
^\s\d+\s(\a*)\s*([a-zA-Z\s]*)\d+\s(\a*)\s*([a-zA-Z\-]*).*
not much more weirdness
ClanClass: looks good
ClanMembers: 1st 9 members arent taken
Dmg|Doa|Dolt|Feihulong|Fiendish|Haunter|Hsif|Jackson|Jaegar|Jaenelle|Kelst|Kessel|Lise|Majic|Mordekain|Pyramus|Shakia|Tenar|Valynn|Vampirella|Vitae|Vivi
ClanRace: looks good
ClanRank: looks good
Looks like, after all the work that just went into all of this it would just be easier to stick with
%s%d%s(%w)%s({%w|%w %w|%w %w %w|%w %w %w %w})%s%d%s(%w)%s(%w)*
EDIT: Of course after all THAT I came up with this
^%s%d%s(%w)%s(%*)%s%d%s(%w)%s(%*)%s%d%s%w%s%d$
#ADDITEM ClanMembers %1
#ADDITEM ClanRank %trim( "%2")
#ADDITEM ClanClass %3
#ADDITEM ClanRace %4
And far as I can tell so far works perfectly.
Pseudo, thank you for the %trim I didn't even know it existed.
I decided rather than stop it after the race to just extend it to include the date as well. Better matching prolly so should be better.
Not I just gotta figure out how to use the claninfo command to populate the ranks, and turn that into a counter.
Thanks all for the help |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 19, 2006 7:10 pm |
Taz wrote: |
Of course it is, that's why you've used the board code display in order to show the spaces and how it is laid out.
So do an alias to turn on the fixed width trigger and issue the command and the last line will be a trigger to turn the fixed width trigger off. It will work very well. |
I have no clue what in the heck yer babbling about...
There is no fixed width..
Code: |
29 Vampirella Family Commoner 125 Psionicist Half-griff 03 Jan 2006
30 Vitae Family Commoner 137 Warrior Half-griff 18 Jan 2006
31 Vivi Family Soldier 30 Paladin Ratling 17 Jul 2005
9 Hudsen Mestere-Lacatuchi 122 Warrior Half-griff 05 Sep 2005 |
The only fixed part is that player names, ranks, classes, races and date start in the same place.
Alias to turn on and off fixed width?..what?... |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Jan 19, 2006 7:13 pm |
Fixed width matching means you match the number of characters:
TRIGGER {^ (&2) (&12) (&20) (&3) (&10) (&10)}
Means after a space match 2 character then a space then match 12 characters etc
Use trim to clean up the spaces around matched elements ie: %trim(%2) to get the name. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 19, 2006 9:03 pm |
oh...makes sense now that I know what trim is all about
Also, didnt know that the & was usable that way
I havea trigger that is like this
^{A|The|""} &TerminateMob is damned forever by the holy power!!
which stores the mob in the TerminateMob var so seeing &2 meant to me a var named 2
Confused me :-)
Tho since there's a chance of 100+ players in a clan that &2 should be a &3 without the begining space, and the date is actually &11 not &10 |
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Thu Jan 19, 2006 9:06 pm |
For now I'll stick with the dataset:
Quote: |
29 Vampirella Family Commoner 125 Psionicist Half-griff 03 Jan 2006
30 Vitae Family Commoner 137 Warrior Half-griff 18 Jan 2006
31 Vivi Family Soldier 30 Paladin Ratling 17 Jul 2005
9 Hudsen Mestere-Lacatuchi 122 Warrior Half-griff 05 Sep 2005
2 Arist Ataman 201 Mage Human 18 Jan 2006
67 Zolin Master of Guidance 127 Mage Vampire 18 Jan 2006
|
I've revised my posted code above to grab all of the data listed.
Code: |
#REGEX {^\s*\d*\s(\a*)\s*([a-zA-Z\s\-]*)\d*\s(\a*)\s*([a-zA-Z\-]*).*} {
#ADDITEM ClanMembers %1
#ADDITEM ClanRank %trim( "%2")
#ADDITEM ClanClass %3
#ADDITEM ClanRace %4
}
|
The changes made were:
^\s was changed to ^\s* to accomodate unlimited spaces at the start of the line since it uses spaces to pad the start.
\- was added into the clanrank filter as "Mestere-Lacatuchi" has a - in it.
Any more data the regex does not pick up? |
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Thu Jan 19, 2006 9:17 pm |
*nod* Vitae. I knew how to use & in that fashion, but I still prefer not to recommend it. Using the same character in multiple fashions has a tendency to confuse me while I am scanning over my triggers, etc. Should that default character ever change to an unused one, I would begin using and recommending that feature.
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 19, 2006 9:22 pm |
k, so i now have this
#VAR ClanClass {Current Rank|--------------------|Family Commander|Family Sergeant|Family Commoner|Family Soldier|Imperial Lord|Imperial Lady|Imperial Heiress} {} "RollCall"
#VAR ClanMembers {No.|---|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31} {} "RollCall"
#VAR ClanRace {Lvl|---|12|201|112|96|116|90|88|19|30|100|103|127|1|147|106|143|41|110|188|29|115|2|125|138} {} "RollCall"
#VAR ClanRank {Name|------------|Anipopo|Ashkelon|Azaeric|Brenden|Bunnie|Chrysta|Chuft|Cougr|CuChulainn|Dmg|Doa|Dolt|Feihulong|Fiendish|Haunter|
Hsif|Jackson|Jaegar|Jaenelle|Kelst|Kessel|Lise|Majic|Mordekain|Pyramus|Shakia|Tenar|Valynn|Vampirella|Vitae|Vivi} {} "RollCall"
I guess, I have to change my alias to turn on a trigger that will read
--- ------------ -------------------- --- ---------- ---------- ----------
and then from there turn on the &3 type stuff.
question is this, trigger speed wise, which wind up being better?
1) Trigger and body
^%s%d%s(%w)%s(%*)%s%d%s(%w)%s(%*)%s%d%s%w%s%d$
#ADDITEM ClanMembers %1
#ADDITEM ClanRank %trim( "%2")
#ADDITEM ClanClass %3
#ADDITEM ClanRace %4
2) Alias turns on trigger which turns on trigger and body
^(&3) (&12) (&20) (&3) (&10) (&11)
#ADDITEM ClanMembers %trim( "%1")
#ADDITEM ClanRank %trim( "%2")
#ADDITEM ClanClass %trim( "%3")
#ADDITEM ClanRace %trim( "%4")
It's my own fault, I never mention how the whole thing starts to begin with
Code: |
Clan roster for Clan Imperium - sorted by Player Name.
No. Name Current Rank Lvl Class Race Last On
--- ------------ -------------------- --- ---------- ---------- ----------
1 Anipopo Family Commander 12 Thief Quickling 13 Jan 2006
|
EDIT: K, i know why the thing captured the wrong stuff, I'd told it to get %1 and not %2 *mutter*
EDIT2:
Realised that the 2nd &10 was right, thought it was the end, but was the race part *thwap self*
end result
Alias turns on trigger:
^--- ------------ -------------------- --- ---------- ---------- ----------$
which then turns on trigger
^(&3) (&12) (&20) (&3) (&10) (&10) (&11)
#ADDITEM ClanMembers %trim( "%2")
#ADDITEM ClanRank %trim( "%3")
#ADDITEM ClanClass %trim( "%5")
#ADDITEM ClanRace %trim( "%6")
working :-)
Thank you for the patience that has been shown. As always I see things that can be done one way and there are shorter ways and I don't bother to think about them :-)
Tho, i still wonder, which is the faster method?
Tried timing it by counting seconds in my head, but damned if i can tell the diff really. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 19, 2006 9:52 pm |
Pseudo wrote: |
I've revised my posted code above to grab all of the data listed.
Code: |
#REGEX {^\s*\d*\s(\a*)\s*([a-zA-Z\s\-]*)\d*\s(\a*)\s*([a-zA-Z\-]*).*} {
#ADDITEM ClanMembers %1
#ADDITEM ClanRank %trim( "%2")
#ADDITEM ClanClass %3
#ADDITEM ClanRace %4
}
|
The changes made were:
^\s was changed to ^\s* to accomodate unlimited spaces at the start of the line since it uses spaces to pad the start.
\- was added into the clanrank filter as "Mestere-Lacatuchi" has a - in it.
Any more data the regex does not pick up? |
Still picking up wrong stuff.
Tho the Name, Clan and roster for Clan Imperium - sorted by Player part is more than likely due to it being turned on already when i run it. tho it's also capturing "members" and adding a | after the last Race and title caught:
|members}
Wolfen|}
Imperial Heiress|}
#VAR ClanClass {Name|Thief|Warrior|Psionicist|Mage|Ranger|Cleric|Paladin|counted} {} "RollCall"
#VAR ClanMembers {Clan|Anipopo|Ashkelon|Azaeric|Brenden|Bunnie|Chrysta|Chuft|Cougr|CuChulainn|Dmg|Doa|Dolt|Feihulong|Fiendish|Haunter|Hsif|Jackson|Jaegar|Jaenelle|Kelst|Kessel|Lise|Majic|Mordekain|Pyramus|Shakia|Tenar|Valynn|Vampirella|Vitae|Vivi|members} {} "RollCall"
#VAR ClanRace {Quickling|Human|Half-griff|Troll|Triton|Vampire|Ratling|Sprite|Eldar|Dwarf|Elf|Wolfen|} {} "RollCall"
#VAR ClanRank {roster for Clan Imperium - sorted by Player|Family Commander|Family Sergeant|Family Commoner|Family Soldier|Imperial Lord|Imperial Lady|Imperial Heiress|} {} "RollCall"
But thats okay, I am quite content with either
^%s%d%s(%w)%s(%*)%s%d%s(%w)%s(%*)%s%d%s%w%s%d$
^(&3) (&12) (&20) (&3) (&10) (&11)
My question is just which is quicker. at a head count seconds, each are 4 seconds, give or take a millisec :-) |
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Thu Jan 19, 2006 9:56 pm |
You've posted two sets of data. Which are you trying to use it on? My example was for the dataset listed with the example as explained.
*Edited* Nevermind, your last post explains that you hadn't included the header information. Since you're content with those two options, I'll let you choose from them. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Jan 19, 2006 10:02 pm |
my datas never changed
Code: |
29 Vampirella Family Commoner 125 Psionicist Half-griff 03 Jan 2006
30 Vitae Family Commoner 137 Warrior Half-griff 18 Jan 2006
31 Vivi Family Soldier 30 Paladin Ratling 17 Jul 2005
9 Hudsen Mestere-Lacatuchi 122 Warrior Half-griff 05 Sep 2005
2 Arist Ataman 201 Mage Human 18 Jan 2006
67 Zolin Master of Guidance 127 Mage Vampire 18 Jan 2006 |
I only added what I had forgotten to show at the beginning
Code: |
Clan roster for Clan Imperium - sorted by Player Name.
No. Name Current Rank Lvl Class Race Last On
--- ------------ -------------------- --- ---------- ---------- ---------- |
So it's this
Code: |
Clan roster for Clan Imperium - sorted by Player Name.
No. Name Current Rank Lvl Class Race Last On
--- ------------ -------------------- --- ---------- ---------- ----------
29 Vampirella Family Commoner 125 Psionicist Half-griff 03 Jan 2006
30 Vitae Family Commoner 137 Warrior Half-griff 18 Jan 2006
31 Vivi Family Soldier 30 Paladin Ratling 17 Jul 2005
9 Hudsen Mestere-Lacatuchi 122 Warrior Half-griff 05 Sep 2005
2 Arist Ataman 201 Mage Human 18 Jan 2006
67 Zolin Master of Guidance 127 Mage Vampire 18 Jan 2006
6 members counted. |
BTW: the data there is not just for my clan but compiled from a few clans to show the different types of stuff that would show |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Fri Jan 20, 2006 8:58 am |
I suspect that they will both be the same speed. Zugg would be able to confirm this.
|
|
_________________ Taz :) |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Fri Jan 20, 2006 3:23 pm |
Well, for a speed followup (not that it matters and prolly no one but me cares:
Using #ECHO %time( nn:ss) on trigger start and trigger end
#TRIGGER "rollcalltrig" {^%s%d%s(%w)%s(%*)%s%d%s(%w)%s(%*)%s%d%s%w%s%d$} {#ADDITEM ClanMembers %1;#ADDITEM ClanRank %trim( "%2");#ADDITEM ClanClass %3;#ADDITEM ClanRace %4} "RollCall" {disable}
2 seconds on a 31 member list
#TRIGGER "rollcalltrig2" {^(&3) (&12) (&20) (&3) (&10) (&10) (&11)} {#ADDITEM ClanMembers %trim( "%2");#ADDITEM ClanRank %trim( "%3");#ADDITEM ClanClass %trim( "%5");#ADDITEM ClanRace %trim( "%6")} "RollCall" {disable}
3 seconds on a 31 member list
#REGEX "rollcalltrig3" {^\s*\d*\s(\a*)\s*([a-zA-Z\s\-]*)\d*\s(\a*)\s*([a-zA-Z\-]*).*} {#ADDITEM ClanMembers %1;#ADDITEM ClanRank %trim( "%2");#ADDITEM ClanClass %3;#ADDITEM ClanRace %4} "RollCall" {disable}
3 seconds on a 31 member list
Honsetly kinda surprised since I always hear regex is faster, I woulda thought regex woulda been 2 and the other 3.
I tried it 5 times each and the same results each time.
Also, tested on a 57 member list:
3, 4, 4 respectfully in the same order as the 31 member. |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Sat Jan 21, 2006 12:58 am |
As zMUD pattern matching was the first (and only for a while) way of pattern matching in zMUD I suspect it
takes precedence over everything else or maybe due to it being compiled in direct and not needing any third
party tool or the like perhaps that is why. Oh Zugg *wave* if you happen to see this thread maybe you can
enlighten us. |
|
_________________ Taz :) |
|
|
|
|
|