>Err... yes, it would work...
No it wouldn't. Use this string instead, and you'll see the problem.
<CFSET string = "002">

Jamie

On Wed, 5 Dec 2001 16:36:52 -0500, in cf-talk you wrote:

>Err... yes, it would work...
>
><CFSET string = "012">
><CFIF REFindNoCase('0', string) EQ 2>
>       <CFOUTPUT>Found 0 at position 2 in string #string#<BR></CFOUTPUT>
><CFELSE>
>       <CFOUTPUT>Didn't find 0 at position 2 in string #string#<BR></CFOUTPUT>
></CFIF>
>
>gives
>
>"Didn't find 0 at position 2 in string 012"
>
>Using "FindNoCase(0,string)" would work as well...
>
>Regards,
>Joel Parramore
>
>
>
>> -----Original Message-----
>> From: cf refactoring [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, December 05, 2001 4:11 PM
>> To: CF-Talk
>> Subject: Re: A little RegEx help . . .
>> 
>> 
>> Dave H,
>> 
>> Your answer 
>> <CFIF REFindNoCase('0', string) EQ 2>do
>> something</CFIF>
>> 
>> isn't correct because you will get a TRUE for the
>> string "012". You should use one of the many
>> suggestions involving mid().
>> 
>> --- Dave Hannum <[EMAIL PROTECTED]> wrote:
>> > I figured it out:
>> > 
>> > <CFIF REFindNoCase('0', string) EQ 2>do
>> > something</CFIF>
>> > 
>> > Dave
>> > 
>> > 
>> > ----- Original Message -----
>> > From: "Dave Hannum" <[EMAIL PROTECTED]>
>> > To: "CF-Talk" <[EMAIL PROTECTED]>
>> > Sent: Wednesday, December 05, 2001 12:42 PM
>> > Subject: A little RegEx help . . .
>> > 
>> > 
>> > I need to look and see if the second character of a
>> > three character string
>> > is a "0" (zero).  How would I do that?
>> > 
>> > <CFIF (insert regex here)> do something </CFIF>   
>> > 8-)
>> > 
>> > Thanks,
>> > Dave
>> > 
>> > 
>> > 
>> > 
>> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to