lib/email_reply_parser.rb
def reverse_regexp(regexp, ignore_case = true)
      regexp_text = regexp.to_s.reverse
      regexp_text.gsub!("*.", ".*")
      regexp_text.gsub!("+.", ".+")
      regexp_text.gsub!("$", "^")
      regexp_text = reverse_parentheses(regexp_text)

      regexp_options = []
      regexp_options << Regexp::IGNORECASE if ignore_case
      Regexp.new(regexp_text, *regexp_options)
    end
# reverses a regular expression 
#
# regexp - String or Regexp that you want to reverse
# ignore_case - where to the returned Regexp should be case insensitive
#
# Returns Regexp
reverses a regular expression
regexp - String or Regexp that you want to reverse
ignore_case - where to the returned Regexp should be case insensitive

Returns Regexp
reverses a regular expression regexp - String or Regexp that you want to reverse ignore_case - where to the returned Regexp should be case insensitive Returns Regexp
def reverse_regexp(regexp, ignore_case = true)
      regexp_text = regexp.to_s.reverse
      regexp_text.gsub!("*.", ".*")
      regexp_text.gsub!("+.", ".+")
      regexp_text.gsub!("$", "^")
      regexp_text = reverse_parentheses(regexp_text)
      regexp_options = []
      regexp_options << Regexp::IGNORECASE if ignore_case
      Regexp.new(regexp_text, *regexp_options)
    end
def reverse_regexp ( regexp , ignore_case = true ) regexp_text = regexp . to_s . reverse regexp_text . gsub! ( "*." , ".*" ) regexp_text . gsub! ( "+." , ".+" ) regexp_text . gsub! ( "$" , "^" ) regexp_text = reverse_parentheses ( regexp_text ) regexp_options = [ ] regexp_options << Regexp :: IGNORECASE if ignore_case Regexp . new ( regexp_text , * regexp_options ) end
reverses a regular expression
regexp - String or Regexp that you want to reverse
ignore_case - where to the returned Regexp should be case insensitive
reverses a regular expression regexp - String or Regexp that you want to reverse ignore_case - where to the returned Regexp should be case insensitive
regexp
ignore_case