Delete from search pattern to end of line?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
BrightonRobin
Posts: 1
Joined: Thu Jun 16, 2005 4:53 am

Delete from search pattern to end of line?

Post by BrightonRobin »

Hi,

I've searched through these forums and read through the help, and I'm sure I'm missing something obvious.

For a web log, for each line, I want to find an occurrence of a text pattern, ".html", and then delete everything else from there to the end of line.

Sorry if it's a basic question. I'd really appreciate some advice.

Thanks again,

Robin.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Easy.

Just search for the perl pattern

\.html[^\r\n]*?

and Replace with nothing.

Ensure the options [...] setting is set to minimal match.
Guest

Post by Guest »

Hey that worked a treat!

Thanks.
Post Reply