I have a table with "news" in it. Some of the content contains links to other sites in the form of html markup. I have extracted the data into a text file, and I want to tidy it up so that it validates as xhtml strict.
So, if I had this for example:
Here is some news about <a href=http://www.google.com>google</a> which I read today
I would want to do a Find and Replace in TextPad to convert it to:
Here is some news about <a href="http://www.google.com">google</a> which I read today
That's all it is - to put the URL in speech marks. I could do half of it with a simple find and replace:
find: <a href=http and replace with: <a href="http
But then the complicated bit is to close the speech marks.
I was hoping that this is something that could be done using a regular expression in the Find and Replace section, but I can't work out how to do it.
I tried something like
find: <a href=[*]> and replace with <a href="[*]">
But obviously this is way too simplistic, and wrong.
If anyone can advise about how I can do this it would be much appreciated. I have read guides and tutorials on RegExpressions but find them totally incomprehensible!
Thanks
Jim
Regular Expression Find and Replace on HTML tags
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 11
- Joined: Wed Jun 01, 2005 6:37 pm
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
-
- Posts: 11
- Joined: Wed Jun 01, 2005 6:37 pm
Thanks!
Thanks very much - that worked without a problem! Excellent...
Jim
Jim