patten matching

Results 1 to 2 of 2

Thread: patten matching

  1. #1
    Join Date
    Dec 1969

    Default patten matching

    I have an html string which i need to look for all the <img screct> tags and add boader=0 so i have <img scr=etc boader=0> any idea how to do this.. been driving my crazy.

  2. #2
    Join Date
    Dec 1969

    Default What you need is...

    ...regular expressions.<BR><BR>Something like<BR><BR>&#060;%<BR>Dim objRegExp<BR>&#039; Replace RegularExpression.ID with the correct ID - not sure of it.<BR>Set objRegExp = Server.CreateObject("RegularExpression.ID")<BR>obj RegExp.Global = True<BR>objRegExp.MatchCase = False<BR>objRegExp.Pattern = "(&#060;img[^&#062;]+)"<BR>myString = objRegExp.Replace(myString, "$1 border=0")<BR>Set objRegExp = Nothing<BR>%&#062;<BR><BR>I can&#039;t guarantee that&#039;ll work, but it&#039;s the basics.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts