Welcome Guest, Not a member yet? Register   Sign In
Regular Expression working on regexr but not in PHP
#7

(06-13-2015, 08:31 AM)CroNiX Wrote: Try
PHP Code:
preg_match('/[0-9]{3}-[A-Z0-9]{3}-[A-Z]{3}/'$coupon

3 digits
followed by dash
followed by mixture of 3 digits and/or A-Z chars
followed by dash
followed by 3 chars A-Z

It worked perfectly. So. php doesn't like the ()?
Reply


Messages In This Thread
RE: Regular Expression working on regexr but not in PHP - by FlevasGR - 06-13-2015, 09:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB