Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Tolpan
Beginner


Joined: 07 Nov 2000
Posts: 23
Location: Germany

PostPosted: 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
Reply with quote
Atreides_096
Wanderer


Joined: 21 Jan 2005
Posts: 99
Location: Solvang, CA

PostPosted: Mon Jul 17, 2006 3:02 am   
 
Try this:
Code:
#regex {^\n} {#Win Debug ::emptyline found}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net