From: Robert Klemme Date: 2009-09-19T19:00:06+09:00 Subject: Re: Newbie: Are Ruby regexp's a subset, superset, or equal to Perl's? On 18.09.2009 21:08, Harry wrote: > Does Ruby 1.9 explicitly support the _full_ regexp flavor of Perl > 5.10? Specifically, things like... look-around assertions, extended / That depends on the Ruby distribution you are using. If you're on 1.9* then many of those features are supported. > experimental Perl regexp features such as "(?{ code })" and "(?? > { code })" . Ruby's RX engine won't execute any code embedded in the expression AFAIK. I second Fabian: look at the docs. But one thing is sure: you cannot expect to copy a Perl regexp over to Ruby and use it as before, especially if advanced features are used. Personally I did not have the need for embedded code in regular expressions yet. If your pattern matching becomes that complex, chances are that a different approach (e.g. code /outside/ the rx) is better maintainable. My impression is that Perl has a tendency to include more and more obscure features which makes it less and less readable over time. When I used it on a daily basis I was pretty fluent but nowadays looking at Perl code gives me the creeps. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/