lib/rails/angulate/mappers/format_validator_mapper.rb
def javascriptify_pattern(pattern)
          pattern.gsub!(/^\\A/, '^')
          pattern.gsub!(/\\z$/, '$')
          "/#{pattern}/"
        end
##
# Will only work with simple regexes that happen to match javascript.
# Replaces leading \A and trailing \z with ^ and $ respectively
Will only work with simple regexes that happen to match javascript.
Replaces leading \A and trailing \z with ^ and $ respectively
Will only work with simple regexes that happen to match javascript . Replaces leading \ A and trailing \ z with ^ and $ respectively
def javascriptify_pattern(pattern)
          pattern.gsub!(/^\\A/, '^')
          pattern.gsub!(/\\z$/, '$')
          "/#{pattern}/"
        end
def javascriptify_pattern ( pattern ) pattern . gsub! ( / ^ \\ A / , '^' ) pattern . gsub! ( / \\ z$ / , '$' ) "/#{pattern}/" end
Will only work with simple regexes that happen to match javascript.
Will only work with simple regexes that happen to match javascript .
pattern