From: "Jesús Gabriel y Galán" Date: 2010-01-14T02:37:19+09:00 Subject: Re: Bug with end of string characters in regex? On Wed, Jan 13, 2010 at 6:33 PM, Justin Coyne wrote: > Looks like I've solved my own problem the \Z in ruby doesn't have the > same semantics as it does in other languages.  There is a \z which is > what I wanted so as expected: > > /\A\n\z/m.match("\n\n") => nil \z end of a string \Z end of a string, or before newline at the end So, \Z allows an extra \n at the end of the string. Jesus.