in reply to Regex Question

/(pass|admin)/

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^2: Regex Question
by ikegami (Patriarch) on Jul 12, 2006 at 18:03 UTC
    or just /pass|admin/ if you don't need to know which word was used. Incidently, not using captures greatly speeds up the regexp.

      You're exageratting. It's just a password, not an epic. I would have said /(?:admin|pass)/ but figured I'd just go with the more readable (though slightly penalized) /(admin|pass)/.

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

        What's wrong with with /admin|pass/? The speed up is just a bonus, not the point.