[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  how about more than 14 wildcards for a trigger

how about more than 14 wildcards for a trigger

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Faolong   USA  (28 posts)  [Biography] bio
Date Tue 22 Oct 2002 05:20 PM (UTC)
Message
this is kinda weird to ask because who would be expecting a mud to have like 16 wildcards!!!! so i was just asking if it was possible to have like 16 or more wildcards for a trigger... and the wildcards array should work right because after the 9th (wildcards[8]), wildcards[9] will just give the trigger line match.... and anything after wildcards[9] is just undefined....
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #1 on Wed 23 Oct 2002 01:43 AM (UTC)
Message
This situation is so rare, I think it's best that you just use the current workaround the few times you need to.

There was another thread on this, some time ago. I'm sorry, I don't recall the subject line or anything.

Currently, you can build multiple triggers. Each trigger will use regular expressions. Use ?: to indicate which expressions should be matched, but NOT returned as a wildcard. IE: You may match on the first 9, then use ?: on the rest. In your second trigger, you would use ?: on the first 9 elements, and then match normally on the rest.

Read "RegularExpressions.txt" in your MUSHclient directory for detailed instructions.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Wed 23 Oct 2002 03:20 AM (UTC)
Message
This post is pretty relevant: Doing your own regular expression matching.

It describes how you can take a trigger match and re-match inside it to pull out more than 10 wildcards. Using the method Magnum describes you can set up a regular expression with more than 10 wildcards (not all will be returned) and then re-match using the technique described above to get the values for all of them.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Vaejor   (120 posts)  [Biography] bio
Date Reply #3 on Wed 23 Oct 2002 10:48 PM (UTC)
Message
Also check out this entry:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=1766#7429

It is a self-contained function to pull out a regexp and return the data to an array.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,795 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]