Deleting Sentences Containing a Certain Phrase

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
erdavis
Posts: 3
Joined: Mon Feb 14, 2005 3:53 pm

Deleting Sentences Containing a Certain Phrase

Post 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
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post 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?
Then I open up and see
the person fumbling here is me
a different way to be
erdavis
Posts: 3
Joined: Mon Feb 14, 2005 3:53 pm

Link to Regex

Post 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
erdavis
Posts: 3
Joined: Mon Feb 14, 2005 3:53 pm

One Further Question : Off Topic

Post 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?
Post Reply