|
Posted by Niels Ganser on 11/07/05 06:08
Andy,
try that one: /^[a-zA-Z]{3}|\p{Sc}$/u
You don't want to put \p{Sc} in square brackets as \p{Sc} itself already
is a character class. Umm.. Kinda don't make myself clear here, do I?
You just don't want to, it's 5am in the morning here I gotta go to the
next bed ;p
Regards,
Niels
Andy Pieters:
> Hi
>
> Thank you for your reply.
>
> My regexp was
>
> /^([a-zA-Z]{3,}|[\W])/
>
> Meaning match any string that is either
> 3 letters
> or
> 1 word character
>
> I'd like to change this to
> 3 letters
> or
> 1 currency character
>
> So I changed the regexp accordingly
> /^([a-zA-Z]{3,}|[\p{Sc}])/u
>
> And I tested with £
>
> but it fails.
>
> Any ideas?
Navigation:
[Reply to this message]
|