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 > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists