|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Thu Jun 05, 2008 4:31 am
[2.25] New line and gags |
I could be wrong, but the following code should work, I would think:
#REGEX {^\*\*NOTE: This is NOT the same as a 'keepflag that\s+\n\s+allows you to save items usually too high level.} {#gagspace}
However, all it does is gag the second line and still displays the first line. So, I change it to:
#REGEX {^\*\*NOTE: This is NOT the same as a 'keepflag' that\s+\n\s+allows you to save items usually too high level.} {#gag -1}
and all it does is gag the first line and not anything after the \n. I have even changed it to just #gag, and it only gags the second line again. The only thing that's worked is this:
#REGEX {^\*\*NOTE: This is NOT the same as a 'keepflag' that\s+\n\s+allows you to save items usually too high level.} {#gag -1;#gag}
Why should I have to have two #gags in there? Seems to me a bug, and I might as well just create two separate triggers.
Charneus |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jun 05, 2008 9:15 am |
I'd guess you need two gags because it's two lines on the screen. The #gag command doesn't know how many lines the trigger that's calling it matched, it just knows "remove the most recent line from the buffer". If you did it this way (which I prefer):
#regex {#REGEX {^\*\*NOTE: This is NOT the same as a 'keepflag that} {#gag}
#cond {allows you to save items usually too high level.} {#gag} {within|param=1}
You'd need two gag commands for the same reason. |
|
|
|
Toxic Adept
Joined: 27 May 2008 Posts: 299
|
Posted: Thu Jun 05, 2008 1:34 pm |
Code: |
#regex {#REGEX {^\*\*NOTE: This is NOT the same as a 'keepflag that} {#gag}
#cond {allows you to save items usually too high level.} {#gagspace} {within|param=1} |
Or even this, which would accomplish what you origionally set out to do. |
|
|
|
|
|