What I meant by "being careful" has to do with the placement of -, ],
and [ in the class.  - is easy:  make it the first or last char, and
it's literal.  [] I can never remember, so I escape.

I just checked, and in 6.1 you don't have to escape a period in a
character class.  I remember not having to in 5, but I could be wrong.
Unlikely as that seems.  :-)

--Ben Doom

Taco Fleur wrote:

> if you're careful? What does that mean?
> I guess I was not careful then, as far as I could see I had to escape the
> period in one of my character classes..
>
> Taco Fleur
> Blog  <http://www.tacofleur.com/index/blog/>
> http://www.tacofleur.com/index/blog/
> Methodology http://www.tacofleur.com/index/methodology/
>
> Tell me and I will forget
> Show me and I will remember
> Teach me and I will learn
>
> -----Original Message-----
> From: Ben Doom [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 25 February 2004 2:46 AM
> To: CF-Talk
> Subject: Re: REFind
>
> Not within a character class.  If you're careful about how you construct
> it, you never have to escape anything in a class.  Unless I forgot about
> something, or course.  :-)
>
> --Ben Doom
>
> Taco Fleur wrote:
>
>  > Don't you have to escape the period? like so \.
>  >
>  > Taco Fleur
>  > Blog  <http://www.tacofleur.com/index/blog/>
>  > http://www.tacofleur.com/index/blog/
>  > Methodology http://www.tacofleur.com/index/methodology/
>  >
>  > Tell me and I will forget
>  > Show me and I will remember
>  > Teach me and I will learn
>  >
>  > -----Original Message-----
>  > From: Pascal Peters [mailto:[EMAIL PROTECTED]
>  > Sent: Tuesday, 24 February 2004 8:17 PM
>  > To: CF-Talk
>  > Subject: RE: REFind
>  >
>  > REFind("[^0-9]",form.PropertyDataPrice)
>  >
>  > If you want to allow other caracters like . and , add them in the class:
>  > REFind("[^0-9.,]",form.PropertyDataPrice)
>  >
>  >  > -----Original Message-----
>  >  > From: Stuart Kidd [mailto:[EMAIL PROTECTED]
>  >  > Sent: dinsdag 24 februari 2004 10:50
>  >  > To: CF-Talk
>  >  > Subject: REFind
>  >  >
>  >  > Hi guys,
>  >  >
>  >  > I'm trying to make sure that my field has ONLY numeric
>  >  > characters otherwise show an error.  I'm using the REFind but
>  >  > it doesn't pick up characters like " $ � etc.
>  >  >
>  >  > <cfelseif REFind("[[:num:]]",form.PropertyDataPrice)><cfset
>  >  > MessageAlert = MessageAlert & "<font color='red'>Price</font>
>  >  > must only be numbers baby.<br>"></cfif>
>  >  >
>  >  >
>  >  > Any ideas?
>  >  >
>  >  > Cheers,
>  >  >
>  >  > Stu
>  >  >
>  >  >  
>  >  >
>  >  >
>  >   _____
>  >
>   _____
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to