From: "Jesús Gabriel y Galán" Date: 2010-01-14T21:37:58+09:00 Subject: Re: Bug with end of string characters in regex? On Thu, Jan 14, 2010 at 12:50 PM, Robert Klemme wrote: > 2010/1/13 Jesús Gabriel y Galán : >> 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. > > For the reference here's the doc: > http://www.geocities.jp/kosako3/oniguruma/doc/RE.txt Good to know thanks. I copied the quote from: http://www.zenspider.com/Languages/Ruby/QuickRef.html#11 Thanks. Jesus.