Click to See Complete Forum and Search --> : Perl regex help needed


Boudga
07-16-2003, 01:09 PM
I have a perl script where I want to search for strings in HTML like:

"<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 style='border-collapse:collapse;border:none'> "

and replace them with:

" <table>"

However when I run my perl script on the html it doesn't make the correct replacement....here's the string I'm trying (note - other substitutions are working, ex. "s/<meta.*>//gi;" replaces "<meta http-equiv=Content-Type content="text/html; charset=windows-1252">"):

"s/<table.*>/<table>\n/gi;"

Thanks in advance for the help!

goldbug
07-16-2003, 04:19 PM
Could it have something to do with the newline at the end of the regex?

(If so, just switch to \n? )