0

I have this already working code

preg_match ('/^\p{L}[\p{L} _.-]+$/u', $address);

but it only validate characters, I just want it to accept numbers as well.

Shubanker
  • 2,415
  • 16
  • 23
  • 1
    You should describe more precisely what you want (with examples and if needed counter-examples) and add what you have already tried. Take a look here too: http://stackoverflow.com/editing-help – Casimir et Hippolyte Dec 02 '15 at 20:12
  • 2
    [What's a number?](http://stackoverflow.com/a/4247184/508666) – PeeHaa Dec 02 '15 at 20:12

1 Answers1

0

The question isn't clear but as far as I can understand you need to match numbers as well .

^[\d\p{L}][\d\p{L} _.-]+$

in PHP

preg_match ('/^[\d\p{L}][\d\p{L} _.-]+$/u', $address);
Shubanker
  • 2,415
  • 16
  • 23