Stefano Crocco
8/21/2008 8:45:00 AM
On Thursday 21 August 2008, Adam Akhtar wrote:
> why does this regexpression match
>
> \w+\d+
>
> match 68 in this
>
> "1/8 Fender '68 TELECASTER Miniature(Pink Paisley)[RARE]",
>
> ive told it to at least match one letter before it matches any
> numbers???
>
> (i dont actually want it to match anything with this sentance).
It's because \w stands for [a-zA-Z0-9], that is an uppercase letter or a
lowercase letter or a digit. To achieve what you want you need this:
/[a-zA-Z]+\d+/
Stefano