|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am having problems geting the find/replace to work the way i want it to using RegExp.
The object is to paste in some code to have checked for cetain items and replaced by others. My problem seems to come after adding a "" as a replace item I want to replace all instances of: <font FACE="WP TypographicSymbols" SIZE="2">= or <font FACE="WP TypographicSymbols">= with the ' character. I used this block of code below to find and replace the Size="2" portion with "" which i thought is empty string strBadHtml= " size=""\d{1,}""" strTouchupHtml= "" objHtmlExp.Pattern = strBadHtml ConvertTo = objHtmlExp.Replace(ConvertTo, strTouchupHtml) the second block of code i have is : strBadHtml= "<font\s*\r*FACE=""WP\s*\r*TypographicSymbols""\s*\r*>\s*\r*=" strTouchupHtml= "'" 'to mark up with replace quote objHtmlExp.Pattern = strBadHtml ConvertTo = objHtmlExp.Replace(ConvertTo, strTouchupHtml) which seems to work until i encounter word wrap if the original was wrapped over 2 lines as below: <font FACE="WP TypographicSymbols" SIZE="2">= It does not react as I want it to I don't know if it's because i replaced size with "" or not Can someone help with this please? Struggling with this big time: Thanks |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Find and replace problems with RegExp |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|