Hi --

On 3/24/07, Brian Candler <B.Candler / pobox.com> wrote:
> (2) Semantic differences between ruby and apparently similar constructions
> in other languages. Regexps provide an example; on the surface they look
> very similar to perl, but underneath there are some important differences
> you may not discover until it's too late.
>
> For instance: in Perl, /^abc$/ matches only the string "abc". This is not
> true in Ruby (although it *is* a valid regexp). To get the same behaviour in
> Ruby, you need to write /\Aabc\z/

Ha -- talk about nostalgic -- when you wrote "Ruby borrows a lot from
perl - in my own opinion a little too much" in your previous post, my
first thought was, "I wonder if that means he's reconciled to the
anchors thing." :-)  (I guess not :-)


David

-- 
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
   (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)