Unix Shell - Re: vs. [^\d\s]

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > December 2007 > Re: vs. [^\d\s]





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: vs. [^\d\s]
Charles A. Landemaine

2007-12-03, 7:33 am

On Nov 29, 6:19 pm, Ed Morton <mor...@lsupcaemnt.com> wrote:
> No, it doesn't. It's the same as the difference between:
>
> "(not 7) OR (not 3)" versus "not (7 OR 3)"
>
> By applying boolean algebra the former is equivalent to "not (7 AND 3)" which of
> course is any number since no number is both 7 and 3.
>
> In your case, "[\D\S]" means "(not digit) OR (not space)" is equivalent to "not
> (digit AND space)" which is any character since no character is both a digit and
> a space, whereas "[^\d\s]" means "not (digit OR space)" which is only the
> characters that are neither a digit nor a space (e.g. an alphabetic character or
> a punctioanion mark, or...).
>



Thanks Ed for the explanatin ;)

--
Charles.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com