Page 1 of 1

Regex to search and replace some html code ny another one

Posted: Mon Apr 02, 2012 4:12 pm
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

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

Posted: Thu Dec 20, 2012 10:48 pm
by CornBread
Search regex for: (<font color="#000080">)(.*)(</font>)
Replace with: <span class="marine">$2</span>

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

Posted: Sun Dec 23, 2012 11:37 pm
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