Welcome Guest, Not a member yet? Register   Sign In
PCRE - Match pound sign
#1

[eluser]richzilla[/eluser]
Hi All,


How would i match a pound sign in a regular expression?

so far ive tried the hex:

Code:
[\xA3]

and the ascii:

Code:
[\163]

however both of these return false for a valid price:

Code:
£125.22

Just for reference, the regex im running it against (in case ive made a mistake here):

Code:
/^[\xA3]?\s?[0-9]+(\.|\,)[0-9]{2}$/


Messages In This Thread
PCRE - Match pound sign - by El Forum - 03-18-2010, 07:21 AM
PCRE - Match pound sign - by El Forum - 03-18-2010, 11:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB