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 ➜ VBscript ➜ Getting a trigger on something that may be there or not

Getting a trigger on something that may be there or not

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


Posted by Metsuro   USA  (389 posts)  Bio
Date Tue 17 Aug 2004 10:30 AM (UTC)
Message
^(An|A|The) (.*?) is DEAD\!\!$

i want it to also just catch on blah is dead!! dont know how i would do that really

Everything turns around in the end
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Tue 17 Aug 2004 11:08 AM (UTC)
Message
Do you need it to return the name? (Horse in The Horse is dead)
If so, try this:
^(An |A |The )?(.*?) is DEAD\!\!$

If not, and you just do this:
^(.*?) is DEAD\!\!$

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #2 on Tue 17 Aug 2004 11:46 AM (UTC)
Message
well i am trying to get it so if those three things there it will match, if not it will still match

Everything turns around in the end
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Tue 17 Aug 2004 07:27 PM (UTC)
Message
If you want the noun to return minus the article, then the first should work.
If youre only worried about the line catching, the second would work just as well.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Nick Gammon   Australia  (23,162 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 18 Aug 2004 09:50 PM (UTC)
Message
Like Flannel says, a question mark after a group makes the entire group optional.

eg.

(foo|bar|wet|weather)?

Matches any of those four words, or none of them.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


15,307 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.