Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runtime error '800a139a' - Unexpected Quantifier

Status
Not open for further replies.

jaslr

Programmer
Aug 16, 2001
67
AU
I have an error

Code:
Microsoft VBScript runtime  error '800a139a'

Unexpected quantifier

somewhere in the following block of text, I understand it has to do something with regular Expressions but to what extent I am not sure?

Code:
function strip_html(str_html)
':::::::::::::::::::::::::::::::::::::::::::::::::::::
' removes html tags from str_html
':::::::::::::::::::::::::::::::::::::::::::::::::::::
	dim objRegExp, str_output
	set objRegExp = new Regexp

	if not isNull(str_html) then

	objRegExp.IgnoreCase = True
	objRegExp.Global = True
	objRegExp.Pattern = "<(.|\n)+?>"
	str_output = objRegExp.Replace(str_html, "")
	objRegExp.Pattern = "\&(.|\n)+?;"
	str_output = objRegExp.Replace(str_output, "")
	str_output = Replace(str_output, "<", "&lt;")
	str_output = Replace(str_output, ">", "&gt;")
	strip_html = str_output

	end if

	set objRegExp = Nothing
end function

Any help would be very appreciated - btw, i'm running IIS as my webserver.
 
Oh My God, I don't believe it, I had a quick read around this forum for similar problems and I read that the "?" could be causing the problem with their issues. So, I removed them from the following lines: "<(.|\n)+?>" and "\&(.|\n)+?;" and now it works.

rofl - :)

NB: I hope this can help someone else who has a similar problem to me.
 
>I read that the "?" could be causing the problem
The point is rather that you should update your script engine to wsh5.6.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top