Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Regular Expression Default Mode Changes from Multiline to Single Line

Rails 4.0

  • Please log in to reply
No replies to this topic

#1 StrongTSQ

StrongTSQ

    Passenger

  • Members
  • 2 posts

Posted 14 August 2013 - 05:31 PM

In rails 4.0, regular expression's default mode is changed to single line.

And you need to specify the :multiline => true if you want to use ^ and $ correctly.

Otherwise, you need to use \A and \Z  instead.

 

Please refer to: http://homakov.blogs...rious-ruby.html

for the details.


  • epson121 likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users