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 ➜ Trigger problem

Trigger problem

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


Posted by Ishnaf   Australia  (17 posts)  Bio
Date Mon 16 Jun 2003 06:37 AM (UTC)
Message
316H 710M 110V [77] >
how can i match this?

My current one doesnt seem to work all the time. I want to do:
*H *M *V [*] >
but it doesnt seem to match properly.... any ideas?

What would the regular expression be?

egads!
Top

Posted by Shadowfyr   USA  (1,792 posts)  Bio
Date Reply #1 on Mon 16 Jun 2003 07:01 AM (UTC)

Amended on Mon 16 Jun 2003 07:02 AM (UTC) by Shadowfyr

Message
Something like:

^(/d+)H/s+(/d+)M/s+(/d+)V/s+/[(/d+)/] >

This would cover all possible bases. Explaination:

^ - This is the start of a line.
/d+ - Match one or more digits.
/s+ - Match one or more spaces.
() - Return this as a wildcard.

Not sure if this would fix whatever is wrong or not, but if the problem is a result of sometimes having more than a single space in between it should. It is also more specific, since it will 'only' match with numbers in front of the H, M and V. If the line is indented (has extra spaces in front some times), then you may need to make it:

^/s{0,}(/d+)H/s+(/d+)M/s+(/d+)V/s+/[(/d+)/] >

That way it will hit even if the line is:
  316H 710M 110V [77] >

instead of

316H 710M 110V [77] >

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.


11,360 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.