Regex help?

Started by Seeker, March 23, 2005, 04:04:38 PM

I am redoing my MUD client trigger's, and they use regular expressions for matching.  I do alright with most of it, but I have forgotten how to match Armageddon's multiple line output.

i.e.
The something, something-haired someone sends you a telepathic message:
   "We are on for Nekrete at dusk.  Bring the 'things.' "


I want the trigger to catch the entire output, based on its including "a telepathic message", for highlighting, or colorizatiion, or whatever, for all psi messages.

^.* a telepathic message:\n.*$, ain't it.

Any help or pointers for multiple lined input?

Seeker
Sitting in your comfort,
You don't believe I'm real,
But you cannot buy protection
from the way that I feel.

depends on the mud client, but I'm guessing it only does one line at a time. so what you'd have to do is try something like this:

(from my fuzzy tintin memory)

#act {%0telepathic message%1} {#high {"%1"} blue;#act {"%1"} {#unhigh {"%1"}}}

Basically, your trigger tells the client to highlight anything in "", then sets a trigger to stop highlighting things in "" after the next one is recieved. Depends on your specific client however, and if all those things happen before the next line is proccessed.

Hope that helps.