http://qs321.pair.com?node_id=1211977


in reply to Re^2: Looking for a regular expression for the following pattern.
in thread Looking for a regular expression for the following pattern.

  1. OP didn't say anything about linefeeds so it's safe to assume they can be ignored
  2. OP didn't say that "_" is not allowed. It's "alphanumeric characters with underscores, one or more"
  3. OP's post is poorly written so expect a poorly written reply ;)

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^4: Looking for a regular expression for the following pattern.
by Laurent_R (Canon) on Mar 29, 2018 at 16:03 UTC
    It is true that the OP is not specific enough (far from that), but if you're suggesting /^[a-z0-9_]+$/i, you might as well suggest /^\w+$/. And this is even less specific than the examples shown by the OP.