Errors in Reg Ex.

Results 1 to 2 of 2

Thread: Errors in Reg Ex.

  1. #1
    Join Date
    Dec 1969

    Default Errors in Reg Ex.

    Hi All, <BR><BR>I am stuck with this problem. I am trying to execute the following code and i get the errors below. Does anyone kno whwats wrong ? <BR><BR>&#060;%<BR><BR>Set xml = Server.CreateObject("Microsoft.XMLHTTP")<BR>theQue ryString=""<BR>xml.Open "GET", theQueryString, False<BR>xml.Send<BR><BR>Dim regEx <BR>Set regEx = New RegExp<BR><BR>strText = xml.responseText <BR><BR>regEX.IgnoreCase = True<BR>regEX.Global = True<BR>regEX.Pattern = "&#060;.+?&#062;"<BR>strText = regEX.Replace(strText, "")<BR>response.write strText<BR><BR>%&#062;<BR>Microsoft VBScript runtime error &#039;800a139a&#039; <BR><BR>Unexpected quantifier <BR><BR>/about_us.asp, line 143 <BR>

  2. #2
    Jeffrey Friedl Guest

    Default RE: Errors in Reg Ex.

    This is a total guess since I&#039;ve never used VB, VBScript,<BR>or any of these Microsoft tools, but the "unexpected<BR>quantifier" error is almost certainly due to the &#039;?&#039;<BR>after the &#039;+&#039;. Only recently was &#039;+?&#039; added as a non-greedy<BR>"one or more" quantifier, and so if your version is from<BR>before that, it&#039;ll see them as seperate quantifiers (which,<BR>of course, can&#039;t run together like that).<BR><BR> Jeffrey

Posting Permissions

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