Sha256: 34986d4fd55b39b9f743e29747b84c6c5410d27ff7fbbfb48148c6f6c0054574
Contents?: true
Size: 486 Bytes
Versions: 1
Compression:
Stored size: 486 Bytes
Contents
module REGEXHELPER def self.email_regex #email addresses with <= 3 letter .tld email_regex ||= Regexp.new('^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$') return email_regex end def self.image_regex #only images with characters and/or numbers in the filename, and an extension of .png, .jpg, .gif - ignores case. image_regex ||= Regexp.new('^.*([^\.][\.](([gG][iI][fF])|([Jj][pP][Gg])|([Jj][pP][Ee][Gg])|([Bb][mM][pP])|([Pp][nN][Gg])))') return image_regex end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
regexhelper-0.1.0 | lib/regexhelper.rb |