Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
cingulli
Wanderer


Joined: 30 Aug 2001
Posts: 53
Location: Finland

PostPosted: Sun Aug 11, 2002 11:07 am   

Pattern-matching
 
how to _only_ match a line like:

blaa blaa 'asdfasdf'

and not lines like:

blaa blaa 'asdfasdf' boobooboo

so i want a trigger which triggers only when the line has only its pattern-match
#tr {blaa blaa 'asdfasdf'} {#co blink} and nothing else, so it wont trigger when the line has any other text, like that boobooboo or any other text for that matter.
I'm too tired to look for this from the helps :(.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Aug 11, 2002 12:38 pm   
 
Use ^ in the pattern to specify where zMUD should match the start of a line and $ to specify where it should match the end of a line. Thus:
^blaa blaa 'asdfasdf'$

will only match:
blaa blaa 'asdfasdf'

and not:
boobooboo blaa blaa 'asdfasdf'
blaa blaa 'asdfasdf' boobooboo
boobooboo blaa blaa 'asdfasdf' boobooboo

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net