Regex to search and replace some html code ny another one

A place to try and solve your RegEx problems.
Post Reply
patrmich
Posts: 18
Joined: Fri Jul 01, 2011 9:01 am

Regex to search and replace some html code ny another one

Post by patrmich »

Hi,

I have a directory of html files

In some files are expressions of the following kind :
<font color="#000080">abcdef.....</font>
where abcdef..... is a string of characters of which length can vary from 1 to 100 characters

I would like to use a Regex to replace
<font color="#000080">abcdef.....</font>
by
<span class="marine">abcdef.....</span>

Does anyone know what Regex can do this with Text Crawler ?

Thank you in advance for any help in this matter.

Patrick
CornBread
Posts: 2
Joined: Thu Dec 20, 2012 8:47 pm

Re: Regex to search and replace some html code ny another on

Post by CornBread »

Search regex for: (<font color="#000080">)(.*)(</font>)
Replace with: <span class="marine">$2</span>
PBY
Posts: 1
Joined: Sun Dec 23, 2012 7:21 pm

Re: Regex to search and replace some html code ny another on

Post by PBY »

May God bless you for the work you put into this. It was recommended by users at techsupportalert.com, but i would like to know what regex coding (which i know little about) to put in the Search and Replace boxes in order in order to change all links (beginning with http://www. and ending with html) in pages within the selected folder to lower case. Thanks
Post Reply