Murcia has asked for the wisdom of the Perl Monks concerning the following question:
I want to have all files that have green or red or blue in the text BUT not the string "green red blue", in a dir!
# parenthesis only to show that this is one string!
# the string "green red blue" can/is several times in the text
When "green", "red", "blue" is in the text together with the string "green red blue" anywhere in the text than too!
example?
text1: you can use green red blue. the mountain was green! yes, use green red blue. text2: you can use green red blue. the mountain was more a hill! text3: you can use colors. the mountain was blue!text1, text2, text3 are in one dir result should be: text1 text3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp exclude a string
by BrowserUk (Patriarch) on Jan 19, 2006 at 14:06 UTC | |
|
Re: regexp exclude a string
by blazar (Canon) on Jan 19, 2006 at 13:48 UTC | |
by Murcia (Monk) on Jan 19, 2006 at 14:34 UTC | |
by blazar (Canon) on Jan 19, 2006 at 14:56 UTC | |
|
Re: regexp exclude a string
by turo (Friar) on Jan 19, 2006 at 15:06 UTC | |
by Murcia (Monk) on Jan 19, 2006 at 15:27 UTC | |
|
Re: regexp exclude a string
by murugu (Curate) on Jan 19, 2006 at 14:18 UTC | |
by blazar (Canon) on Jan 19, 2006 at 15:00 UTC |