Reputation: 11
I would like to match if a string contains more than 1 identical character, for example : Using PHP preg_match or similar function.
the character would be "-"
Something-or other : no match
Test-tes-t : match
Basically what I want to do is disallow the use of more than 1 "-" in a user input.
Upvotes: 1
Views: 146