LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 02-10-2006, 07:23 AM   #1
stomach
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 202

Rep: Reputation: 30
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?

Last edited by stomach; 02-10-2006 at 07:24 AM.
 
Old 02-10-2006, 07:41 AM   #2
stomach
Member
 
Registered: Sep 2005
Distribution: Debian
Posts: 202

Original Poster
Rep: Reputation: 30
It functioned thus:
/^Subject.*(red)*.*(blue)/

thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expressions markjuggles Programming 2 05-05-2005 12:39 PM
Regular Expressions overbored Linux - Software 3 06-24-2004 03:34 PM
help with REGULAR EXPRESSIONS ner Linux - General 23 11-01-2003 12:09 AM
Regular expressions aromes Linux - General 1 10-15-2003 01:29 PM
regular expressions? alaios Linux - General 2 06-11-2003 04:51 PM


All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration