Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 6th, 2005, 6:02 AM   #1
crmpicco
Newbie
 
Join Date: Feb 2005
Posts: 13
Rep Power: 0 crmpicco is on a distinguished road
Thumbs down RegExp

I have this code below:
<%

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><font face=verdana size=2><b>"& sMyArray_5(counter) &"</b>&nbsp;</font></td>"
if counter = 10 then
     response.write "<td></td>"
else
     response.write "<td align=right><font face=verdana size=2>&nbsp;" & match_5.SubMatches(0) & "</font></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
crmpicco is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:49 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC