 |
quigbrew Novice
Joined: 04 Jun 2002 Posts: 31
|
Posted: Wed Sep 29, 2004 8:40 pm
capturing single OR multiline text into a variable |
Hi again,
I've been working on this for a while and haven't figured out a way to do it. I'm trying to capture text into a variable, but sometime the text is wrapped onto the next lines, and sometimes it's just on one line. Anyone know if there's a way to capture text until a certain point, like a period or quotes?
Here's the line I'm trying to capture.
(Order): Bob says, "The following people are at A PURPLE HILL: Joey, Frank, Sammy."
The number of names and the location varies, so if the location title is long, there's a good chance the names will wrap onto the next line. Similarly, if there's a bunch of names, it might wrap onto multiple lines.
Here's the trigger I'm using:
Code: |
~(Order~)~: (*) says, "The following people are at (@location)~: |
@location will already have the same value as what is being reported by bob.
Anyone have any ideas?
Thanks |
|
|
 |
Backu Novice
Joined: 24 Feb 2003 Posts: 36 Location: USA
|
Posted: Wed Sep 29, 2004 9:12 pm |
Use the "" as part of the actual trigger itself, and it will capture everything in it.
|
|
_________________ -Backu Zethara |
|
|
 |
quigbrew Novice
Joined: 04 Jun 2002 Posts: 31
|
Posted: Thu Sep 30, 2004 1:48 am |
I tried just adding a quotation mark on the end but it's not capturing anything if the sentence is wrapped.
Here's the pattern I tried:
~(Order~)~: * says, "The following people are at @shrdef~:(*)." |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Sep 30, 2004 2:00 am |
The order these triggers are created in is essential to their correct operation.
#TR lp {(*)} {#VAR people {@{people}%1}}
#TR {The following people are at @location: (*)} {#T+ lp;#VAR people {%1}}
#TR {.} {#T- lp;#VAR people {%replace( %replace( @people, %char( 34), ""), ., "")}} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
 |
|
|