From: "Mauricio Fernández" Date: 2003-02-13T04:34:05+09:00 Subject: Re: String frustration On Thu, Feb 13, 2003 at 01:23:37AM +0900, Tim Kynerd wrote: > >>> re = %r{([^\t]+)\t([^\t]+)\t([^\t]+)\n}m > > => /([^\t]+)\t([^\t]+)\t([^\t]+)\n/m > >>> a =~ re > > => 0 > >>> p $1, $2, $3 > > "1" > > "second field\nwith newlines\nbla\nbla" "third" > > => nil > > No offense, but if I wanted THAT, I'd be using Perl. No offence???? You just called me Perl-lover, man! ;-) [never really used Perl] > Thanks anyway. If you want to get it more "the Ruby way", * use the object oriented regex interface or * use String#scan But AFAIK, matz doesn't consider regexes to be an evil perlish feature to be deprecated. I'll go on using them. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com How do you power off this machine? -- Linus, when upgrading linux.cs.helsinki.fi, and after using the machine for several months