Skip to main content
Participant
July 15, 2008
Question

Replacing a range

  • July 15, 2008
  • 1 reply
  • 297 views
Hi, sorry if this has been asked many times before but I couldn't find anything on it.

I need to replace html tags from a string I get from the user so as the string contains no html, I don't know which tags the string may contain. I thought if I did a find on < and > and then took their location in the string, I could strip out the text (tag) inbetween the < and > however I can't seem to find a way to make replace work with a start and end interger value as it seems to only take a string as its search term.

Is it possible to give it a range to search between?

Hope that makes sense and thanks for reading

william
    This topic has been closed for replies.

    1 reply

    Inspiring
    July 15, 2008
    htmlString = reReplace(htmlString, "</?([^>]+)>", "", "ALL");
    wibo1Author
    Participant
    July 15, 2008
    Thanks Simon that works perfectly