Guest User

Untitled

a guest
Jan 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. $text = "We have 13 cats";
  2. $pattern = "/1[0123456789]/";
  3.  
  4. if(preg_match($pattern, $text)) {
  5. echo "true";
  6. } else {
  7. echo "false";
  8. }
Add Comment
Please, Sign In to add comment