Register forum user name Search FAQ

Gammon Forum

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 ➜ General ➜ RegExpression help....

RegExpression help....

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


Posted by Gore   (207 posts)  Bio
Date Sun 08 Feb 2004 11:06 PM (UTC)
Message
Hello, I'm trying to trigger these phrases,,

Quote:

"rat200385" the corpse of an old rat
"rat205891" the corpse of a rat
"rat201877" the corpse of a baby rat


I need the rat#, and anything after of doesn't matter, so far I've got this for a reg expression pattern


^\"*\"\sthe corpse of*$


But it doesn't work, any ideas?

Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #1 on Mon 09 Feb 2004 02:47 AM (UTC)
Message
^\"(.*)\" the corpse of.*$

() is needed to tell it to actually return the number. Otherwise is just matches the text, but does not produce a wild card. If you also need the name then add () around the last '.*' as well. As for the '.*' itself, regexp in mushclient uses the Perl standard, so * means only 'look for one or more of these'. The '.' is actually the part that means 'any character'. So to get more than one of any possible character you need '.*'. ;)
Top

Posted by Gore   (207 posts)  Bio
Date Reply #2 on Mon 09 Feb 2004 03:03 AM (UTC)
Message
Way to rock Shadow >:) Thanks again.
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.


13,301 views.

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

Go to topic:           Search the forum


[Go to top] top

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