|
AesirMergera Beginner
Joined: 07 Oct 2004 Posts: 25
|
Posted: 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.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
AesirMergera Beginner
Joined: 07 Oct 2004 Posts: 25
|
Posted: Sun Aug 21, 2005 8:29 am |
Bingo, works *most* of the time. Very nice for off the top of your head sir
|
|
|
|
|
|