How do I match on optional conditions?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

How do I match on optional conditions? Thu Sep 04, 2014 7:05 pm • by jeffpoulton
I'm trying to create a rule that matches on a filename with one or more optional conditions. For example, a file name needs to start with a word (abc) but might optionally have two words (abc [abc]). There have been other situations where indicating optional matches would make my rules more flexible.
jeffpoulton
 
Posts: 1
Joined: Thu Sep 04, 2014 7:00 pm

Re: How do I match on optional conditions? Fri Sep 05, 2014 12:12 am • by dhy8386
Are you saying you would like a rule to run on a file that begins with abc but not run if the file begins with abc-abc? If so, you can just create a rule that runs if pattern 1 matches and pattern 2 does not match. So run if abc AND not abc-abc.
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm


Return to Support

cron