replace everything after a particular character

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Post Reply
Posts: 1
Joined: Fri Aug 22, 2003 4:43 am
Location: Tulsa, OK USA

replace everything after a particular character

Post by mcfillen » Fri Aug 22, 2003 4:51 am

I have read the FAQ on how to replace everything after a particular character but still don't get it. I am trying to delete all of the text after a pattern (cleaning up URL's for spam filter lists). How would I delete everything after the .COM in:


Posts: 9
Joined: Tue Sep 23, 2003 3:13 am

Easy one!

Post by jring » Tue Sep 23, 2003 9:14 am


OK this is a few steps, but this works really well:

1. Search Replace Exact:
S: http://
R: http%%%

2. Search Replace Exact:
S: /
R: <carriage return>

3. Search Replace Exact:
S: http%%%
R: http://

4. Extract URLS.
5. Remove Blanks from begginning line.
6. Remove Blanks from end of line.
7. Remove Blank lines.

If you are working with very large files, you will bump into situations where this doesn't work, and will need to refine your strategy. However, this will definitely get you off the ground.


Post Reply