SHARE
TWEET

Untitled

a guest May 31st, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Can anyone tell me why this regular expression does not match?  It matches fine in an online tester.
  2.  
  3. var_dump([$this->$attribute, preg_match('/^\d{1,5}$/g', $this->$attribute)]); exit;
  4.  
  5. array(2) {
  6.   [0]=>
  7.   string(5) "10123"
  8.   [1]=>
  9.   bool(false)
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top