Re: Regular Expressions: Grouping and backreferences...

2002-09-10 Thread Janek Schleicher
eric-perl wrote at Tue, 10 Sep 2002 09:32:22 +0200: > How can I capture all the words that contain 'at' in the string 'A fat cat > sat on my hat.'? > > Any pointers? > > $sentence = 'A fat cat sat on my hat.' > $sentence =~ m/(\wat)/; > > returns: > > $1 = 'fat' As TMTWTDI, here's a solu

Re: Regular Expressions: Grouping and backreferences...

2002-09-10 Thread Chas Owens
On Tue, 2002-09-10 at 03:32, [EMAIL PROTECTED] wrote: > Hello, All: > > How can I capture all the words that contain 'at' in the string 'A fat cat > sat on my hat.'? > > Any pointers? > > $sentence = 'A fat cat sat on my hat.' > $sentence =~ m/(\wat)/; > > returns: > > $1 = 'fat' > > --

RE: Regular Expressions: Grouping and backreferences...

2002-09-10 Thread Mark Anderson
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 12:32 AM To: Beginners Perl Mailing List Subject: Regular Expressions: Grouping and backreferences... Hello, All: How can I capture all the words that contain 'at' in the

Regular Expressions: Grouping and backreferences...

2002-09-10 Thread eric-perl
Hello, All: How can I capture all the words that contain 'at' in the string 'A fat cat sat on my hat.'? Any pointers? $sentence = 'A fat cat sat on my hat.' $sentence =~ m/(\wat)/; returns: $1 = 'fat' -- Eric P. Sunnyvale, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona