Sha256: f6eccc30ad3a9582239f0c6c2288bedfeb102a471922b9c47f2cbb469e8862e0

Contents?: true

Size: 199 Bytes

Versions: 4

Compression:

Stored size: 199 Bytes

Contents

# frozen_string_literal: true

module EmailTypo
  RemoveInvalidChars = lambda do |email|
    email
      .gsub(/(\s|\#|\'|\"|\\)*/, "")
      .gsub(/(\,|\.\.)/, ".")
      .gsub("@@", "@")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
email_typo-0.2.0 lib/email_typo/remove_invalid_chars.rb
email_typo-0.1.2 lib/email_typo/remove_invalid_chars.rb
email_typo-0.1.1 lib/email_typo/remove_invalid_chars.rb
email_typo-0.1.0 lib/email_typo/remove_invalid_chars.rb