Trigger problem

Posted by Ishnaf on Mon 16 Jun 2003 06:37 AM — 2 posts, 11,924 views.

Australia #0
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?
USA #1
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] >