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
  • 9,598
  • 13
  • 48
  • 65
Devil Raily
  • 552
  • 1
  • 5
  • 15

0 Answers0