From: Michael Klishin Date: 2008-11-29T08:14:36+09:00 Subject: [ruby-core:20161] \Z? in regular expression in 1.9.1 I noticed that the following reg exp causes syntax error in 1.9.1 (I use tip of the branch): /\n(\.\/)?(.*spec\.rb):[\d]+:\Z?/ To reproduce, just fire up irb of 1.9.1 and try to assign this literal to some variable. The problem is with ? quantifier following \Z. I could not find any information about this restriction on the web and have no Mastering regular expressions book at hand. Could someone shed some light on whether it is 1.9.1 engine restriction, general regular expressions restriction or possible 1.9.1 bug? Just in case: this regexp comes from autospec in RSpec. Thank you, MK