Re: Regexp: Correct braces

2008-10-06 Thread Rob Dixon
Mr. Shawn H. Corey wrote: > Rob Dixon wrote: >> >> My example wasn't a nested one. It was just an example of two incorrect brace >> matches as the OP described them. > > You make it sound like I just discovered them and haven't been using > them for the past 30 years. If you have been using state

Re: Regexp: Correct braces

2008-10-06 Thread Mr. Shawn H. Corey
On Mon, 2008-10-06 at 12:12 +0100, Rob Dixon wrote: > Mr. Shawn H. Corey wrote: > > On Fri, 2008-10-03 at 12:38 +0100, Rob Dixon wrote: > >> Mr. Shawn H. Corey wrote: > >>> > >>> Note that if these structures can be nested, you will have to use a FSA > >>> with a push-down stack. > >> > >> That wil

Re: Regexp: Correct braces

2008-10-06 Thread Rob Dixon
Mr. Shawn H. Corey wrote: > On Fri, 2008-10-03 at 12:38 +0100, Rob Dixon wrote: >> Mr. Shawn H. Corey wrote: >>> >>> Note that if these structures can be nested, you will have to use a FSA >>> with a push-down stack. >> >> That will match a line like >> >> [wrong) and (wrong] >> >> Rob >> > > No

Re: Regexp: Correct braces

2008-10-03 Thread Dr.Ruud
Vyacheslav Karamov schreef: > Hi All! > > I need to capture something in braces using regular expressions. > But I don't need to capture wrong data: > > [Some text] - correct > (Some text) - also correct > [Some text) - wrong > (Some text] - also wrong http://search.cpan.org look for Regexp::Co

Re: Regexp: Correct braces

2008-10-03 Thread Mr. Shawn H. Corey
On Fri, 2008-10-03 at 12:38 +0100, Rob Dixon wrote: > Mr. Shawn H. Corey wrote: > > Note that if these structures can be nested, you will have to use a FSA > > with a push-down stack. > > That will match a line like > > [wrong) and (wrong] > > Rob > Note that if these structures can be neste

Re: Regexp: Correct braces

2008-10-03 Thread Rob Dixon
Mr. Shawn H. Corey wrote: > On Fri, 2008-10-03 at 11:52 +0300, Vyacheslav Karamov wrote: >> Hi All! >> >> I need to capture something in braces using regular expressions. >> But I don't need to capture wrong data: >> >> [Some text] - correct >> (Some text) - also correct >> [Some text) - wrong >> (

Re: Regexp: Correct braces

2008-10-03 Thread Mr. Shawn H. Corey
On Fri, 2008-10-03 at 11:52 +0300, Vyacheslav Karamov wrote: > Hi All! > > I need to capture something in braces using regular expressions. > But I don't need to capture wrong data: > > [Some text] - correct > (Some text) - also correct > [Some text) - wrong > (Some text] - also wrong > #!/usr/

Re: Regexp: Correct braces

2008-10-03 Thread Rob Dixon
Vyacheslav Karamov wrote: > Hi All! > > I need to capture something in braces using regular expressions. > But I don't need to capture wrong data: > > [Some text] - correct > (Some text) - also correct > [Some text) - wrong > (Some text] - also wrong HTH, Rob use strict; use warnings; while

Re: Regexp: Correct braces

2008-10-03 Thread Rob Coops
On Fri, Oct 3, 2008 at 11:15 AM, Vyacheslav Karamov <[EMAIL PROTECTED]>wrote: > Rob Coops пишет: > >> Try this: >> (?:Some text not captured) >> The ?: at the beginning tels perl that even though you want it to see >> thsi whole group you would not like perl to capture the string. >> Look up pe

Re: Regexp: Correct braces

2008-10-03 Thread Vyacheslav Karamov
Rob Coops пишет: Try this: (?:Some text not captured) The ?: at the beginning tels perl that even though you want it to see thsi whole group you would not like perl to capture the string. Look up perlre (http://perldoc.perl.org/perlre.html) for some more information on this particulair to

Regexp: Correct braces

2008-10-03 Thread Vyacheslav Karamov
Hi All! I need to capture something in braces using regular expressions. But I don't need to capture wrong data: [Some text] - correct (Some text) - also correct [Some text) - wrong (Some text] - also wrong -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO