Russ,
If I understand correctly, this might be of help:
<cfset teststring = "aa bbb ccc e ff aa 01-Dec-2001 ddd dddd ddd
02-May-2006 eeeee eeeeee eeee">
<cfset start = 1>
<cfset regex = "\b[0-9]{2}-[A-Za-z]{3}-[0-9]{4}\b">
<cfloop condition="#REFind(regex,teststring,start)# gt 0">
<cfoutput>
#Mid(teststring,REFind(regex,teststring,start),11)#<br>
</cfoutput>
<cfset start = REFind(regex,teststring,start)+1>
</cfloop>
The regular expression is based on that you have a dd-mmm-yyyy
pattern. Then you loop over your file content until it runs out of
"hits".
Best of luck,
Caroline Wise
On 7/29/05, Russ Michaels <[EMAIL PROTECTED]> wrote:
> I did try something along those lines originally, but CF doesn't seem to be
> able to pickup the chr(10) or chr(13)
>
>
> Russ
>
> -----Original Message-----
> From: Spike [mailto:[EMAIL PROTECTED]
> Sent: 29 July 2005 18:03
> To: CF-Talk
> Subject: Re: regex
>
> You don't need to use a regex to get that info out of the whois output.
>
> <cfset aLines = listToArray(whoisInfo,chr(10)) /> <cfset expiryLine = "" />
> <cfloop from="1" to="#arrayLen(aLines)#" index="i"> <cfif
> findNoCase("Expiration Date",aLines[i])> <cfset expiryLine = aLines[i] />
> <cfbreak> </cfif> </cfloop>
>
> <cfif len(expiryLine)>
> <cfset dateString = listLast(expiryLine,":") /> <cfset expiryDate =
> parseDateTime(dateString) /> <cfoutput>#expiryDate#</cfoutput> </cfif>
>
> Spike
>
> On 7/29/05, Russ Michaels <[EMAIL PROTECTED]> wrote:
> >
> > While that tag looks very handy, it doesn't write the REGEX for you,
> > you still have to supply the REGEX to the tag for it to find the text
> > your looking for.
> >
> >
> > Russ
> >
> > -----Original Message-----
> > From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> > Sent: 29 July 2005 17:22
> > To: CF-Talk
> > Subject: Re: FW: [CF-Dev] regex
> >
> > >>I need to extract data from WHOIS output.
> >
> > Have a look a CF_REExtract:
> >
> > http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
> > m?p=hf
> >
> > It has especially developed for this king of job.
> >
> > --
> > _______________________________________
> > REUSE CODE! Use custom tags;
> > See http://www.contentbox.com/claude/customtags/tagstore.cfm
> > (Please send any spam to this address: [EMAIL PROTECTED]) Thanks.
> >
> >
> >
> >
> >
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213296
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54