Module: UserPassRegexes
- Included in:
- TopinambourRegex
- Defined in:
- lib/terminal_regex.rb
Overview
Constant Summary collapse
- USERCHARS =
"-+.[:alnum:]"
- USER =
Nonempty username, e.g. “john.smith”
"[#{USERCHARS}]+"
- PASSCHARS_CLASS =
'[-[:alnum:]\\Q,?;.:/!%$^*&~\"#\'\\E]'
- PASS =
Optional colon-prefixed password. I guess empty password should be allowed, right? E.g. “:secret”, “:”, “” */
"(?x: :#{PASSCHARS_CLASS}* )?"
- USERPASS =
Optional at-terminated username (with perhaps a password too), e.g. “joe@”, “pete:secret@”, “” */
"(?:#{USER}#{PASS}@)?"