in reply to Need regex to check for disallowed characters
(Not sure if you mean more than one consecutive space or just more than one space; or if you mean whitespace characters or just the space character; adjust to suit.)$input !~ /\d|\pP|\s.*?\s/;
I see in a followup that you perhaps mean any non-word non-space character when you say punctuation. So maybe something like: /[^\w\s]|\d|\s{2}/ (which will still allow _; if you don't want that, say /[^\w\s]|[\d_]|\s{2}/).
|
|---|