I am afraid, your suggestion is even breaking for
already working ones! i.e., it says HEXADECIMAL NUMBER
for an invalid string like "f4dx" and also says
HEXADECIMAL NUMBER for invalid empty strings.

The one I had posited,without the leading "^" and "$"
matched for all the cases correctly, except for empty
strings. Hence the question.

Thanks,
Rex

--- Nikola Janceski <[EMAIL PROTECTED]>
wrote:
> see below
> 
> /^[^0-9a-fA-F]+$/   #if this evals to true string is
> NOT
> 
> ## start of string ^ and end of string $
> 
> -----Original Message-----
> From: RTO RTO [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 11, 2002 11:00 AM
> To: [EMAIL PROTECTED]
> Subject: Simple RegEx Question
> 
> 
> Here is a RegEx that I am using to check if the
> given
> string is Hexadecimal or not.
> 
> /[^0-9a-fA-F]+/   #if this evals to true string is
> NOT
> hex
> 
> I am having a trailing "+" to make sure at least one
> permissible character is present. Yet, it matches an
> empty string as a hex string.
> 
> a) What am I missing? 
> b) Why is an empty string being matched?
> 
> 
> 
> Thanks,
> Rex
> 
> 
> __________________________________________________
> Yahoo! - We Remember
> 9-11: A tribute to the more than 3,000 lives lost
> http://dir.remember.yahoo.com/tribute
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
>
----------------------------------------------------------------------------
> --------------------
> The views and opinions expressed in this email
> message are the sender's
> own, and do not necessarily represent the views and
> opinions of Summit
> Systems Inc.
> 


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to