very urgent !!!whats wrong in this pattern

Results 1 to 2 of 2

Thread: very urgent !!!whats wrong in this pattern

  1. #1
    Join Date
    Dec 1969

    Default very urgent !!!whats wrong in this pattern

    I&#039;m creating an dynamic asp file and then want to save it as htm file.I can do this with fso.But while saving as htm file i want to eliminate some code inside the &#060;span&#062; &#060;/span&#062; tag using the regular expressions.But this does not remove the code inside the span tags.<BR><BR>Please help me in getting the thing right asap.<BR><BR>Sincere Thanks,<BR>Sachin<BR><BR>I&#039;m using the following code<BR><BR>DO WHILE objTextStream.AtEndOfStream &#060;&#062; TRUE<BR>strLine = objTextStream.ReadLine <BR> <BR> Set re = New RegExp <BR> re.Global = true re.IgnoreCase = true re.Pattern = "&#060;span&#062;(.*?)&#060;/span&#062;" <BR> strLine1 = re.replace(strLine,"")<BR><BR> TextStreamObject.WriteLine strLine1<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: very urgent !!!whats wrong in this pattern

    You are executing the regular expression on one line at a time, so if the &#060;span&#062; starts on one line and ends on another you won&#039;t match anything! Try reading the whole file into your variable ( .ReadAll ) before you use your regular expression.

Posting Permissions

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