Page 1 of 1

Deleting Sentences Containing a Certain Phrase

Posted: Fri Feb 18, 2005 4:07 pm
by erdavis
Granted I am no genius at this and have read many posts which are similar, but the problem I am trying to solve is as follows.

Evertime Wildedits finds the word "Lamb" or "Pork" I want to completely delete the line.

Can someone help me get a handle on how to do this???

Also has anyone tried the regular expressions generator by Regex??

-eric

Posted: Fri Feb 18, 2005 4:27 pm
by s_reynisson
Find what: ^.*?(Pork|Lamb).*?$
Replace with: empty
Tick Regular expression and Replacement format. I also had to tick under options '.' does not match a newline character in the Matching options section.

I've not tested to the Regex generator, got a link?

Link to Regex

Posted: Fri Feb 18, 2005 4:49 pm
by erdavis
Here is the link.

Thanks for the help.

http://www.regexbuddy.com/

Regular Expressions are very powerful, but quite difficult. I am going to try and get the O'Reilly Book today.

-eric

One Further Question : Off Topic

Posted: Fri Feb 18, 2005 6:26 pm
by erdavis
I bought the O'Reilly book am working on learning, but I fear I may be using WildEdits Improperly.

I have log files on the sever that need to delete a bunch of lines everyday.

First question : Can I run WildEdits to automatically crank up and execute a script?? I don't want to get into doing Perl, C, PHP, Python stuff.

Second Question: I want to write a script of like 3-4 lines can WildEdit support multiple lines in a script.

I was trying to combine:
Step 1: ^.*?(Robot|Homer|_vti_bin|sitedata.asmx).*?$
Step 2:^\r?\n


Got any advice?