I have this line:
var htmlString;
Assigned:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> <head> <title>Payment Receipt</title> <link rel="stylesheet" type="text/css" href="content/PaymentForm.css"> <style type="text/css"> </style> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> </head> <body> <div id="divPageOuter" class="PageOuter"> <div id="divPage" class="Page"> <div id="divThankYou"> Thank you for your order! </div> <hr class="HrTop"> <div id="divReceiptMsg"> You may print this receipt page for your records. </div> <div class="SectionBar"> Order Information </div> <table id="tablePaymentDetails1Rcpt"> <tr> <td class="LabelColInfo1R"> Merchant: </td> <td class="DataColInfo1R"> Ryan </td> </tr> <tr> <td class="LabelColInfo1R"> Description: </td> <td class="DataColInfo1R"> Rasmussenpayment </td> </tr> </table> <table id="tablePaymentDetails2Rcpt" cellspacing="0" cellpadding="0"> <tr> <td id="tdPaymentDetails2Rcpt1"> <table> <tr> <td class="LabelColInfo1R"> Date/Time: </td> <td class="DataColInfo1R"> 09-Jul-2012 12:26:46 PM PT </td> </tr> <tr> <td class="LabelColInfo1R"> Customer ID: </td> <td class="DataColInfo1R"> </td> </tr> </table> </td> <td id="tdPaymentDetails2Rcpt2"> <table> <tr> <td class="LabelColInfo1R"> Invoice Number: </td> <td class="DataColInfo1R"> 176966244 </td> </tr> </table> </td> </tr> </table> <hr id="hrBillingShippingBefore"> <table id="tableBillingShipping"> <tr> <td id="tdBillingInformation"> <div class="Label"> Billing Information </div> <div id="divBillingInformation"> Test14 Rasmussen<br> 1234 test st<br> San Diego, CA 92107 <br> </div> </td> <td id="tdShippingInformation"> <div class="Label"> Shipping Information </div> <div id="divShippingInformation"> </div> </td> </tr> </table> <hr id="hrBillingShippingAfter"> <div id="divOrderDetailsBottomR"> <table id="tableOrderDetailsBottom"> <tr> <td class="LabelColTotal"> Total: </td> <td class="DescrColTotal"> </td> <td class="DataColTotal"> US $250.00 </td> </tr> </table> </div> <div id="divOrderDetailsBottomSpacerR"> </div> <div class="SectionBar"> Visa ****0027 </div> <table class="PaymentSectionTable" cellspacing="0" cellpadding="0"> <tr> <td class="PaymentSection1"> <table> <tr> <td class="LabelColInfo2R"> Date/Time: </td> <td class="DataColInfo2R"> 09-Jul-2012 12:26:46 PM PT </td> </tr> <tr> <td class="LabelColInfo2R"> Transaction ID: </td> <td class="DataColInfo2R"> 2173493354 </td> </tr> <tr> <td class="LabelColInfo2R"> Authorization Code: </td> <td class="DataColInfo2R"> 07I3DH </td> </tr> <tr> <td class="LabelColInfo2R"> Payment Method: </td> <td class="DataColInfo2R"> Visa ****0027 </td> </tr> </table> </td> <td class="PaymentSection2"> <table> </table> </td> </tr> </table> <div class="PaymentSectionSpacer"> </div> </div> </div> <div class="PageAfter"> </div> </body> </html>
And I want to find the location of "x_auth_code.1.val" in the line. And then I want to get a string from a location plus a certain number of characters. The goal would be to return the authorization code.
source share