Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Tips and tricks
➜ Needing triggers for height highlighting
Needing triggers for height highlighting
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| StefanWulph
USA (35 posts) Bio
|
Date
| Fri 05 Jul 2002 09:42 PM (UTC) |
Message
| Hello all.
I need some help. I need a setup trigger/s that's automagically highlight a fur's height. here are some examples of what I've seen.
800 meters, 2000 tall, 2600 feet tall, 80 foot-tall, 180 feet tall, 6 feet, ten ft. six in, 5 feet 10 inches, five feet five inches, 6 ft tall, 2' tall and 6'4"
Any help and examples with be much appreciated THanks all.
Stefan Wulph
Proud Winfur and FADHD | Top |
|
Posted by
| Magnum
Canada (580 posts) Bio
|
Date
| Reply #1 on Sat 06 Jul 2002 04:43 AM (UTC) |
Message
| Oh my, what a nightmarish challenge for using Regular Expressions! Before taking a stab at it, could your provide a few examples that show the whole line? |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | Top |
|
Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
Date
| Reply #2 on Sat 06 Jul 2002 04:47 AM (UTC) |
Message
| Yes... Real examples would help some. I considered trying to tackle this and stopped when my head exploded. lol But in general it 'should' be possible with enough information. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #3 on Sat 06 Jul 2002 08:54 AM (UTC) |
Message
| How about...
Since, I assume, each number would be followed by an appropriate measurement... Most of them have spaces in between, and Im going to assume they have spaces in front of them (if not, Theyre at the beginning of the line, and its just as well), just remove my first space and replace it with a new-line...
I wont go over each individual... Ill just TRY And give a reasonable general explination of how *I* would go about this... Without all the fancy syntax and such, for now.
Heregoes.
Use Reg Exp (obviously),
[ ][A-Za-z0-9]+[ ](inch|inches|foot|feet|meter|meters)(( |-)tall)?
That should match anything that is in text form (all except the ' " notation), Color that, Add in any other Length measurements to the alternatives, and you SHOULD be set... I think. the whole 6 in thing may be a problem, since, "in" is used as a word... If you can give the Reg Exp more specificity (like, if there is a "You see a monster standing [height]" you can match on that...)
As for the other notation...
the ammounts will all be numbers, so
[0-9]+('|")(( |-)tall)?
should do the trick...
Although, If you have someone talking (if your mud quotes using ' or " and they end a line with a number, this too will be highlighted...
However, as has been said already, Specific Examples will help.. a LOT, as we can cue in on other keywords to make your Reg Exps more reliable, and remove the bugs as stated above. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | 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,948 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top