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
Mortis
Beginner


Joined: 10 Feb 2004
Posts: 21
Location: Sweden

PostPosted: Thu Mar 24, 2005 3:11 pm   

a small %grep problem.
 
Hello

I have a alittle %grep() issue.

According to #Type helpfile(and Iam guessing %grep works the same) "the pattern can contain full pattern-matching commands."

Ok. I looked up "Pattern Matching" in the help file.

I wanna use "{val1|val2|val3|...}" AND "{^string} do not match the specified string".

Meaning, I want all lines that DOESNT contain either "anti-mage" or "anti-evil".

After ALOT of trying I can't get it to work.
I can't even get "do not match the specified string" cause zmud automaticly thinks I want to match in the beginning of the line.

Sure..
Code:
#type (1) {{anti-mage|anti-evil}}

does work but it's the reverse I want.

So.. Anyone got any sugggestions on how to %grep all lines that DOESNT contain 2 different patterns?
_________________
When you lose, dont lose the lesson.
Reply with quote
Kiasyn
Apprentice


Joined: 05 Dec 2004
Posts: 196
Location: New Zealand

PostPosted: Fri Mar 25, 2005 11:00 am   
 
um i dunno if this will work... but try

if ( !%match( %grep(1,{val1|val2|val3}), "string" ) )

or something similar... :P
_________________
Kiasyn
Owner of Legends of Drazon
Coder on Dark Legacy
Check out Talon, an easy IMC connection.
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