Sha256: 23ccf7a114aff40f9829700ba8e8dd19ae384f88bfbfde9a7886e3e37271c1f1

Contents?: true

Size: 357 Bytes

Versions: 6

Compression:

Stored size: 357 Bytes

Contents

# frozen_string_literal: true

module EmailTypo
  DotCom = lambda do |email|
    email
      .gsub(/\.co[mn]\.com/, ".com")
      .gsub(/\.com\.$/, ".com")
      .gsub(/\.com(?!cast|\.|@).{1,3}$/, ".com")
      .gsub(/\.co[^op]$/, ".com")
      .gsub(/\.c*(c|ck|ci|coi|l|m|n|o|op|cp|0|9)*m+o*$/, ".com")
      .gsub(/\.(c|f|v|x)o+(m|n)$/, ".com")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
email_typo-0.2.3 lib/email_typo/dot_com.rb
email_typo-0.2.2 lib/email_typo/dot_com.rb
email_typo-0.2.1 lib/email_typo/dot_com.rb
email_typo-0.2.0 lib/email_typo/dot_com.rb
email_typo-0.1.2 lib/email_typo/dot_com.rb
email_typo-0.1.1 lib/email_typo/dot_com.rb