#1
|
||||
|
||||
How to do multiple find and replace in string.
While parsing response text obtained from website using winhttp, I am cleaning it to remove unnecessary text like this. Code:
StrTxt = Replace(StrTxt, "<CENTER><b><i>Claims</b></i></CENTER> <HR> <BR><BR>", "") StrTxt = Replace(StrTxt, "What is claimed is: <BR><BR>", "") StrTxt = Replace(StrTxt, "I claim: <BR><BR>", "") StrTxt = Replace(StrTxt, "We claim: <BR><BR>", "") I know how to do that in range fro earlier posts. I don't know how to extrapolate that knowledge to string. |
#2
|
||||
|
||||
You could use:
Code:
StrTxt = Replace(Replace(Replace(StrTxt, "<CENTER><b><i>Claims</b></i></CENTER> <HR> <BR><BR>", ""), "What is claimed is: <BR><BR>", ""), "I claim: <BR><BR>", ""), "We claim: <BR><BR>", "")
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
Ok. I will stick with current method.
|
Tags |
vba, wordvba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Find Multiple Wildcard string and Highlight | PRA007 | Word VBA | 2 | 10-17-2015 01:07 AM |
How do I find and replace multiple items at once? | redzan | Word VBA | 1 | 05-16-2013 08:25 AM |
Find and replace a string of text | errtu | Word | 1 | 01-31-2013 02:09 PM |
Bad view when using Find and Find & Replace - Word places found string on top line | paulkaye | Word | 4 | 12-06-2011 11:05 PM |
Find and Replace multiple lines/paragraphs | jcw | Word | 1 | 11-18-2011 11:47 AM |