A simple ruby module with regexps
Ruby
code posted
created at 19 Jan 16:30
Edit
|
Back
1 2 3 4 5 6 7 8 |
module Wiki module RegExp COMMON_NAME = /\A[a-z][0-9a-z_-]*[0-9a-z](\.[0-9a-z][0-9a-z_-]*)*\Z/i USER_NAME = COMMON_NAME EMAIL = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i end end |
207 Bytes in 2 ms with coderay