Hi lina, 2012/2/9 lina <lina.lastn...@gmail.com>
> On Thu, Feb 9, 2012 at 2:31 PM, Jeff Peng <p...@staff.dnsbed.com> wrote: > > 于 2012-2-9 14:10, lina 写道: > > > >> On Thu, Feb 9, 2012 at 1:44 PM, Jeff Peng<p...@staff.dnsbed.com> wrote: > >>> > >>> > 于 2012-2-9 12:44, lina 写道: > >>> > > >>>> > >>>> >> $string =~ m/(\S+)(and|or)(\S+)/; > >>> > >>> > > >>> > > >>> > $string =~ m/(\S+)\s+(and|or)\s+(\S+)/; > *you could also use:* $string =~ m/^(.+?)(and|or)(.+?)$/img; check perldoc perlre, for more information. > >> > >> Wow, thanks > >> > >> how does that one not work as expected, > >> > >> I am reading brian d foy "Mastering Perl", > >> http://www.amazon.com/Mastering-Perl-brian-d-foy/dp/0596527241 > >> > > > > > > You may then ask brian :P > > I am pretty new to perl and this list. > > Ha ... just did a google about him minutes ago. > > > You have lost matching the spaces in the original post. > > Thanks, > > > > Jeff. > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- Tim