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
AesirMergera
Beginner


Joined: 07 Oct 2004
Posts: 25

PostPosted: Sat Aug 20, 2005 6:37 am   

Multiline capture
 
I need to capture a list of exits between "There are visible exits" and the following period "." after the sentence. Sometimes all the exits are on one line and sometimes they fill up up to 3-4 lines.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat Aug 20, 2005 12:08 pm   
 
#TRIGGER ExitCap {^There are visible exits (*)} {Exits="%1";#IF (%ends(@Exits,".")) {#STATE ExitCap 3;#SET ExitCap 3 1}}
#COND {} {Exits=%concat(@Exits," ",%line);#IF (%ends(@Exits,".")) {#STATE ExitCap 3;#SET ExitCap 3 1}} {looplines|param=10}
#COND {} {#ECHO Failed to detect end in Exitcap;#STATE ExitCap 0} {wait|param=100}
#COND {} {#ECHO ExitCap complete, do further processing here.;#STATE ExitCap 0} {manual}

That is off the top of my head and has had no debugging or checking.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
AesirMergera
Beginner


Joined: 07 Oct 2004
Posts: 25

PostPosted: Sun Aug 21, 2005 8:29 am   
 
Bingo, works *most* of the time. Very nice for off the top of your head sir
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