On Thu, Dec 13, 2001 at 10:41:57AM -0500, Jeff 'japhy' Pinyan wrote:
> I probably would have thought about y/// after a while, but I can't pass
> up a good regex. ;)
> 
>   y/a-zA-Z//>2&&y/0-9//>1
> 
> is probably where I'd get to.  I think RJK's attempt to cheat the system
> fails:
> 
>   y/a-zA-Z//&y/0-9//>1
> 
> fails for 4 and 3 (0100 & 0011 == 0).

That is NOT what I posted.


This is the solution I posted:

y/a-zA-Z//>2&y/0-9//>1


Or, more readably:

(y/a-zA-Z// > 2) & (y/0-9// > 1)

Each numeric comparison will return either 1 or 0.  The bitwise-and will
return true if and only if both numeric comparisons return true.


Ronald

Reply via email to