I was hoping that by breaking the problem into its component parts, you'd figure out where you went wrong on your own.
cmp is for ascii comparisons. <=> is for numeric comparisons. (A number, for reference, is generally (thought not exhaustively) defined as matching /^-?(?:\d+(?:\.\d*))|(?:\.\d+)$/.)
Your regex is pulling characters that match (roughly) /[a-zA-Z_0-9\s]/. (I'm sure I missed a few characters that match \w.)
Do you see the issue now?
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
| [reply] [d/l] [select] |