Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 11th, 2005, 11:06 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default RegExp ASP/VB function ????

I get this error:

Error Type:
Microsoft VBScript compilation (0x800A0411)
Name redefined
/mackenzie/asp/fare_details.asp, line 284, column 4
Dim childexpression: Set childexpression = New RegExp
---^

__________________________________________________ ______

My Code:

Dim childexpression: Set childexpression = New RegExp
childexpression.Pattern = "[^:]*:([^,]*),?"
childexpression.Global = True
Dim childmatch, child_first_matches
Set child_first_matches = childexpression.Execute(theChStr)
For Each childmatch In child_first_matches
    response.write "<tr><td align=left>&nbsp;" & childmatch.SubMatches(0) & "</td></tr>"
Next
Set child_first_matches = Nothing
Set childexpression = Nothing

__________________________________________________ _

Its referring to RegExp, but thats a ASP/VB function is it not?

Not a variable?

I have this above the code above:

Dim expression: Set expression = New RegExp

but thats for something else.....



www.crmpicco.co.uk
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old February 11th, 2005, 01:17 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

i think u probably declared the variable "childexpression" somewhere else in the same page.

Following is the example of regExp, and it is ASP/VB Object:

<%
 Set regx = New RegExp
 regx.Pattern = "(.*)/([^/]*.asp)"
 Set path = Request.ServerVariables("SCRIPT_NAME")
 Set matchs = regx.Execute(path)
 Set match1 = matchs(0)
 Set subMatches = match1.Submatches
 dir = subMatches(0)
 file = subMatches(1)
%>


Om Prakash




Similar Threads
Thread Thread Starter Forum Replies Last Post
how to call asp.et and vb.net function using javas dilipv General .NET 3 March 27th, 2008 02:44 PM
Function in VB Manisha0605 .NET Framework 1.x 3 February 4th, 2007 11:04 AM
Need some help with a VB function crowsfan31 Beginning VB 6 1 June 19th, 2006 02:36 PM
How to call javascript function from VB function vinod_yadav1919 VB How-To 0 February 13th, 2006 06:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.