From: ts Date: 2004-05-14T23:40:14+09:00 Subject: Re: Regexp Error? >>>>> "S" == Simon Strandgaard writes: S> Lets break it down svg% ruby -rjj -e '"abc".match(/(.*).*/)' Regexp /(.*).*/ 0 start_memory $1 1 anychar_repeat 2 stop_memory $1 3 anychar_repeat 4 end subexpressions : 1 Fastmap supplied : \000-\011\013-\377 String <> pos=0 0 start_memory |abc | 1 anychar_repeat |abc | >2[0] >2[1] >2[2] >2[3] F2[3] 2 stop_memory abc| | $1=abc 3 anychar_repeat abc| | >4[0] F4[0] SUCCESS svg% What I want to say is that if the second .* can't match the empty string because it's included in the first match, then the result will be different. Guy Decoux