Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 6th, 2005, 05:54 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

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.