0

I have string that am checking to see if it contains valid characters.

This is the code

preg_match('/^[a-zA-Z0-9/-.,; ]+$/', $string)

When I remove "/" it works

preg_match('/^[a-zA-Z0-9/-.,; ]+$/', $string)

What can be the issue here?

Adrian Cid Almaguer
  • 7,815
  • 13
  • 41
  • 63
Devil Raily
  • 562
  • 1
  • 5
  • 15

0 Answers0