Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace vs. RegExp.Replace

Status
Not open for further replies.

Schroeder

MIS
Sep 25, 2001
382
US
I need to run through various text files replacing certain text with other text. I need to open the file then run through a lengthy list of words that need to be changed, searching and replacing as necessary.

My first thought was to open the text file, bring the whole thing into one string variable then execute a Replace for each of the words in my list. Since I've got to go through an extensive list of possibly large files, I'm wondering if the RegExp's Replace method might perform better. Also, is there a practical limit to the size of the string upon which Replace or RegExp.Replace will operate?
 
See thread792-331698 for a rather extensive discussion and testing of various replace methods. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Well, that about covered it didn't it? Apologies for my inadequeate keyword search.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top