I want to check an input string to validate a proper text.
a. I want the users to allow to writer alphanumeric characters including period, comma, hyphen and round b
Most regex libs support the folloing: /(.)\1{2,}/
/(.)\1{2,}/
where \1 is a a backreference
\1