LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   regular expressions. (https://www.linuxquestions.org/questions/linux-software-2/regular-expressions-413773/)

stomach 02-10-2006 06:23 AM

regular expressions.
 
I have the following expression regexp:

/^Subject.*blue*.*red/

When the subject of the email will be written these 2 words goes to banned.

example:

xxxxx blue yyyy red = BANNED

But making the inverse one it is not banned

xxxxx red yyyy blue = DISCART

How I make the expression to banish, when the two expressions are in any place of the subject?

stomach 02-10-2006 06:41 AM

It functioned thus:
/^Subject.*(red)*.*(blue)/

thanks


All times are GMT -5. The time now is 11:28 PM.