Re: nested parens

2004-04-04 Thread JupiterHost.Net
Let's test it. use strict; use warnings; use Data::Dumper 'Dumper'; foreach my $string ( '(foo) (bar)', '(foo) (bar) (baz)', '((foo) bar)) (baz)', '(foo bar)',) { my @text_inside_parens = $string =~ m/\((.*)\)/g; print Dumper

Re: nested parens

2004-04-04 Thread R. Joseph Newton
"Charles K. Clarkson" wrote: > JupiterHost.Net <[EMAIL PROTECTED]> wrote: > : > : [EMAIL PROTECTED] wrote: > : > Is there a module out there that I can use to parse > : > a text line and return the pieces that are enclosed > : > in paren's? > : > : You don't need a module for that just use regex's

Re: nested parens

2004-04-04 Thread JupiterHost.Net
Let's test it. use strict; use warnings; use Data::Dumper 'Dumper'; foreach my $string ( '(foo) (bar)', '(foo) (bar) (baz)', '((foo) bar)) (baz)', '(foo bar)',) { my @text_inside_parens = $string =~ m/\((.*)\)/g; print Dumper

RE: nested parens

2004-04-03 Thread Charles K. Clarkson
JupiterHost.Net <[EMAIL PROTECTED]> wrote: : : [EMAIL PROTECTED] wrote: : > Is there a module out there that I can use to parse : > a text line and return the pieces that are enclosed : > in paren's? : : You don't need a module for that just use regex's: : : my @text_inside_parens = $string =~ m

Re: nested parens

2004-04-03 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Is there a module out there that I can use to parse a text line and return the pieces that are enclosed in paren's? You don't need a module for that just use regex's: my @text_inside_parens = $string =~ m/\((.*)\)/g; HTH Lee.M - JupiterHost.Net Thanks -- To unsubscr

RE: nested parens

2004-04-02 Thread ewalker
thanks -Original Message- From: Randy W. Sims [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 5:24 PM To: ewalker Cc: [EMAIL PROTECTED] Subject: Re: nested parens [EMAIL PROTECTED] wrote: > Is there a module out there that I can use to parse a text line and return the >

Re: nested parens

2004-04-02 Thread Randy W. Sims
[EMAIL PROTECTED] wrote: Is there a module out there that I can use to parse a text line and return the pieces that are enclosed in paren's? Yep, a core module name Text::Balanced. Randy. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]