• Post Reply Bookmark Topic Watch Topic
  • New Topic

string replac

 
Allen Chan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone can give me a quick dirty way to replace a substring in a (html)document recursively?
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you provide an example of what you want to do? I'm not sure if recursively is what you want -- perhaps, repetitively?
Repetitively (replace all of the occurrances):

Recursively (It will replace everything and then check to see if the string exists, and then keep replacing until the original string is no longer found):
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!