s = cfexecute_output;

s = removeChars(s, 1, find("---", s) + 3);
s = trim(s);

That should give you everything after the three dashes.  If you're looking
for three dashes on a line by themselves, then replace the find() call with
REfind("^---$", s) and you should be set.

banreyb


---
Barney Boisvert, Senior Development Engineer
AudienceCentral (formerly PIER System, Inc.)
[EMAIL PROTECTED]
voice : 360.756.8080 x12
fax   : 360.647.5351

www.audiencecentral.com

> -----Original Message-----
> From: Martin, Ryan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2003 4:26 PM
> To: CF-Talk
> Subject: Trim help?
>
>
> I have this variable that stores the output of a cfexecute function, for
> our payment processing. I am trying to figure out a way to trim it down
> so that the variable data is only the text after the --- towards the
> bottom. Since the response from the server will always be a Y000001
> number or NDECLINED after the ---, I figure it should be possible to do
> a validation off the first letter of the string Y or N.
>
> Does anyone have an idea of how to make that with happen? I tried a
> Right(output, 33) but the problem is the length varies if it is approved
> or declined so that didn't work.
>
> Thanks for your help on this,
> Ryan
>
> variable data
> ---------------
>
> cert_file = [/localmode.crt]
> key_file = [/localmode.key]
> Agent = [localmode_SSL/0.2.1 (OpenSSL/0.9.6; UNIX; Linux 2.4.18 i686)]
> SSL connection using EDH-RSA-DES-CBC3-SHA
> Server certificate:
> subject: /www.creditnet.com
> issuer: /CN=Comodo Class 3 Security Services CA
> HTTP/1.1 200 OK
> Date: Wed, 02 Apr 2003 21:41:44 GMT
> Server: Apache
> Content-Length: 32
> Keep-Alive: timeout=15
> Connection: Keep-Alive
> Content-Type: text/html
>
> Y000001
> 3E8-B59191D-8B292-2B422
> ---
> Y000001
> 3E8-B59191D-8B292-2B422
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to