Try this:
<cfloop list="#this.lstUIDs#" index="i">
<cfif REFind("\d{9}-\d{3}", i)>
<cfset psyEx = psyEx + 1>
<cfelse>
<cfset psy = psy + 1>
</cfif>
</cfloop>
It gave me:
psyEx = 14
psy = 11
-----Original Message-----
From: Scott Stewart [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 15, 2007 12:50 PM
To: CF-Talk
Subject: RE: REFind
What I want to happen is this:
>From the list of UID's passed into the loop; If the UID matches the pattern
Add 1 to psyEx, because the UID will be ignored
Otherwise add 1 to psy, because the UID will be handed off and processed.
What's happening is that either, the RegEx is wrong and the pattern's not
matching or.. I should be doing this some other way than REFind, which I
can't figure out.
sas
--
Scott Stewart
ColdFusion Developer
SSTWebworks
7241 Jillspring Ct.
Springfield, Va. 22152
(703) 220-2835
http://www.sstwebworks.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 15, 2007 11:37 AM
To: CF-Talk
Subject: Re: REFind
Not sure from your message what exactly is happening, but
try this statement for your REFind()
<cfif REFind("^\d{9}-\d{3}$",i) gt 0>
Steve Brownlee
http://www.fusioncube.net/
----- Original Message Follows -----
From: "Scott Stewart" <[EMAIL PROTECTED]>
To: CF-Talk <[email protected]>
Subject: REFind
Date: Tue, 15 May 2007 11:21:28 -0400
> Hey all,
>
>
>
> I may not be understanding REFind properly.
>
>
>
> I have this:
>
>
>
> <cfloop list="#this.lstUIDs#" index="i" delimiters=",">
>
> <cfif REFind("^\d{9}-\d{3}$","i") is "1">
>
> <cfset psyEx = psyEx+1>
>
> <cfelse>
>
> <cfset psy = psy+ 1>
>
> </cfif>
>
> </cfloop>
>
>
>
> What's coming in is a list of UID's from a form. The UID's
> that match the pattern are ignored by an outboard
> application.
>
>
>
> Psy and psyEx are counters for an "x of y records
> exported" The outboard app only returns a text file.
>
>
>
> My traces show this:
>
>
>
> information type[11:16:50.015
> C:\Inetpub\wwwroot\psychnet\classes\ContentManagement.cfc
> @ line: 28] [2844 ms (1st trace)] - [this.lstUIDs =
> 207862004-001,303062003-001,303302003-001,307972005-001,31
> 3642005-039,315352
> 004-001,316162004-001,318502004-001,388372004-001,40565200
> 5-001,504842006-00
> 1,504972006-001,505122006-001,567792006-001,2006-13416-000
> ,2006-20801-014,20
> 06-22931-014,2006-23020-006,2006-23022-005,2006-23072-005,
> 2006-23081-010,200
> 6-23500-001,2006-23500-002,2006-23500-013,2006-23500-020]
> UID information type[11:16:50.015
> C:\Inetpub\wwwroot\psychnet\classes\ContentManagement.cfc
> @ line: 29] [2844 ms (0 ms)] - [psy = 1] psy
> information type[11:16:50.015
> C:\Inetpub\wwwroot\psychnet\classes\ContentManagement.cfc
> @ line: 30] [2844 ms (0 ms)] - [psyEx = 0] psyEx
>
>
>
> --
>
> Scott Stewart
>
> ColdFusion Developer
>
>
>
> SSTWebworks
>
> 7241 Jillspring Ct.
>
> Springfield, Va. 22152
>
> (703) 220-2835
>
>
>
> http://www.sstwebworks.com
>
>
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278296
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4