Find link replace target with '.'

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
User avatar
Mike Olds
Posts: 226
Joined: Wed Sep 30, 2009 3:27 pm
Contact:

Find link replace target with '.'

Post by Mike Olds »

Hello,

I am sure this has been covered before, but I am unable to find a useful thread using search.

What I have is a seed list for a search index. Items in the unedited seed list look like:

<a href="http://localhost/~pali/sn/05_mv/sn05.45.057.pali.bd.htm"> http://localhost/~pali/sn/05_mv/sn05.45.057.pali.bd.htm </a><br>

I need them to look like:

<a href="http://localhost/~pali/sn/05_mv/sn05.45 ... ">.</a><br>
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

This might do what you want:
Find what: (<a [^>]*>)[^<]*(</a>)
Replace with: \1.\2

[X] Regular expression
User avatar
Mike Olds
Posts: 226
Joined: Wed Sep 30, 2009 3:27 pm
Contact:

Post by Mike Olds »

Thanks Ben, that worked fine.

I went about it the long way:

(<a href=[a-zA-Z0-9"_ .:/-]*)>([a-zA-Z0-9"_ .:/-]*)
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
Post Reply