Wrox Programmer Forums
|
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 June 6th, 2005, 05:54 AM
Friend of Wrox
 
Join Date: Jan 2005
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

I have this code below:
Code:
<%

theStr = xmldoc.documentelement.selectnodes("dataElementsMaster").item(0).selectnodes("dataElementsIndiv").item(k).selectnodes("miscellaneousRemarks").item(0).selectnodes("remarks").item(0).selectnodes("freetext").item(0).text



'... Split the <freetext> XML Reply by : and ,
Dim expression_5: Set expression_5 = New RegExp
expression_5.Pattern = "[^:]*:([^/]*)/?"
expression_5.Global = True
Dim match_5, first_matches_5
Set first_matches_5 = expression_5.Execute(theStr)

dim sMyArray_5
sMyArray_5 = Array("Adult Net Net","Weekend Supp.","Pre-Addon","Markup","Agent Markup","Gross Fare","Fuel Surcharge","Tax","TOTAL")
counter = 0
For Each match_5 In first_matches_5
    response.write "<tr bordercolor=#ececec><td align=right colspan=30><b>"& sMyArray_5(counter) &"</b>&nbsp;</td>"
if counter = 10 then
    response.write "<td></td>"
else
    response.write "<td align=right>&nbsp;" & match_5.SubMatches(0) & "</td>"
    response.write "<td width=175>&nbsp;&nbsp;</td></tr>"
end if
counter = counter+1
Next
theStr's output is:

ADTNN:870.00/WKEND:20.00/ADDON:0.00/MKUP:20.00/AGTMKUP:40.00/FARE:950.00/FUEL:0.00/TAX:134.20/TTL:1,084.20

I need to find a way to pick out the Agent Markup as i need to do some calculations on it. How can i do this?

TIA.

Picco



www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
RegExp Problem Abbas Classic ASP Professional 0 August 2nd, 2006 10:48 AM
Regexp how to (also Urgent) NEO1976 Javascript 1 July 10th, 2006 08:54 AM
RegExp crmpicco Javascript How-To 0 July 7th, 2005 05:59 AM
RegExp Nitin_sharma Javascript 2 November 30th, 2004 07:21 AM
regexp problem godhsf80 PHP How-To 2 March 10th, 2004 04:54 AM





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