Hello, everyone! That's me again with a possible bug in regexp implementation. My operationg environment is this: ruby 1.7.1 (2001-06-06) [i586-linux] perl 5.6.1 [i386-linux] Linux Slackware 7.2-x86-current Consider the following example: xm:~$ perl -e 'print "123456" =~ /^123/, "\n"' 1 (right, first one) xm:~$ perl -e 'print "123456" =~ /^456/, "\n"' (right, no match) xm:~$ perl -e 'print "123\n456" =~ /^456/, "\n"' (right, no match) xm:~$ ruby -e 'print "123456" =~ /^123/, "\n"' 0 (right, first one) xm:~$ ruby -e 'print "123456" =~ /^456/, "\n"' nil (right, no match) xm:~$ ruby -e 'print "123\n456" =~ /^456/, "\n"' 4 (wrong, must be no match) This behavior seems incorrect - ruby regexp implementation treats newlines as line starts, and therefore the /^somehting/ matches even not at start of the line. I think I'll accept this behavior in multiline mode /.../m (though even this is incorrect - afaik /m only adds \n to '.' volume, so patterns like '.*' will accept "123\n456"). Maybe it is really an intended behavior and there is an option to switch this off, but this difference from perl regexps is sometimes frustrating (I spent about an hour finding out why my syntax checker validates as correct a completely invalid expression). Also, if this is normal, I want to propose a change, perhaps by additional option in regexps, or (preferably for existing code), a global variable $something (yikes! - I hate globals ;) which controls this, or at least want to know why this way was preferred over perl one. P.S. this may be a bug in latest CVS snapshot only and won't touch careful people who don't use hot-and-fresh snapshots ;)) Thanks for your attention Aristarkh A Zagorodnikov, Lead Programmer, W3D Group http://www.w3d.ru /// xm / w3d.ru /// ICQ UIN 36987938