 |
Tolpan Beginner
Joined: 07 Nov 2000 Posts: 23 Location: Germany
|
Posted: Fri Jul 14, 2006 1:44 pm
BUG: Matching empty lines with Perl regular expressions |
When trying to match empty lines with a trigger based on perl compatible regular expressions, a pattern like "^$" works quite well, e.g.
#REGEX {^$} {#Win Debug ::emptyline found}
To be a little more fault tolerant to the mud output, I want to trigger on lines with only whitespace too. In my oppinion "^\s*$" should do the job, so I expected the following trigger to work
#REGEX {^\s*$} {#Win Debug ::emptyline found}
The odd thing is, when I use the Test tab at the trigger, it keeps telling me that empty lines and whitespaces match the pattern.
However, it doesn't seem to work on mud output though. The trigger never fires on empty lines.
Does anyone experienced similar behaviour yet? Or did I miss the point somewhere?
TIA |
|
|
 |
Atreides_096 Wanderer
Joined: 21 Jan 2005 Posts: 99 Location: Solvang, CA
|
Posted: Mon Jul 17, 2006 3:02 am |
Try this:
Code: |
#regex {^\n} {#Win Debug ::emptyline found} |
|
|
|
 |
|
|
|
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
|
|