From: Miguel Teixeira Date: 2009-09-04T09:33:26+09:00 Subject: Oniguruma: Different result in ruby 1.9.1 and 1.8.7 Hi, I have the following regular expression created in ruby 1.9.1: /(?:(?:\$(?'name1'[\w\s\']+)(?:(?'name2'(?:created|developed)[\w\s]+)(?name3'(?:in|at)[\w\s]+)))|(?:\$(?'name1'[\w\s\']+)(?'name2'(:?created|developed)[\w\s]+))|(?:\$(?'name1'[\w\s\']+)(?'name3'(?:in|at)[\w\s]+)))(?:\.(?'name4'[\w\s]+))?/.match(str) To use Oniguruma i have installed the following gem: http://github.com/geoffgarside/oniguruma/tree/master (also tried with this solution: http://www.goodbyehelicopter.com/2008/02/20/install-oniguruma-on-os-x/) After the installation of Oniguruma i have created the following regular expression in ruby 1.8.7: Oniguruma::ORegexp.new('(?:(?:\$(?\'name1\'[\w\s\']+)(?:(?\'name2\'(?:created|developed)[\w\s]+)(?\'name3\'(?:in|at)[\w\s]+)))|(?:\$(?\'name1\'[\w\s\']+)(?\'name2\'(:?created|developed)[\w\s]+))|(?:\$(?\'name1\'[\w\s\']+)(?\'name3\'(?:in|at)[\w\s]+)))(?:\.(?\'name4\'[\w\s]+))?').match(str) My problem is that the result in ruby 1.8.7 is different from the result in 1.9.1. Anyone has an idea about what's going on? I also tried to substitute ?\'name1\' with ? Thanks, -- Miguel Teixeira -- Posted via http://www.ruby-forum.com/.