Re: Greedy v non greedy regexps in lookahead.

2008-11-23 Thread Andrew
Thanks "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > How would it parse "XMLSchema" ? You need to write down the rules > before you try creating than regex for them. Try: > Ok - I am a typical customer - my stated requirement isn't quite my real requirement :-)

Re: Greedy v non greedy regexps in lookahead.

2008-11-23 Thread Dr.Ruud
Andrew schreef: > I am tying to expand some camel case with spaces - but I want multiple > captitals to remain as one word. So > I want "PerlNotesOnXML" -> "Perl Notes On XML" > > My attempt is to use [A-Z]+ in a lookahead. > > my $text = "PerlNotesOnXML" ; > $text =~ s/(?=[A-Z]+)/ /gx ; > p

Re: Greedy v non greedy regexps in lookahead.

2008-11-23 Thread Rob Dixon
Andrew wrote: > I am tying to expand some camel case with spaces - but I want multiple > captitals to remain as one word. So > I want "PerlNotesOnXML" -> "Perl Notes On XML" > > My attempt is to use [A-Z]+ in a lookahead. > > my $text = "PerlNotesOnXML" ; > $text =~ s/(?=[A-Z]+)/ /gx ; >

Re: Greedy v non greedy regexps in lookahead.

2008-11-23 Thread John W. Krahn
Andrew wrote: I am tying to expand some camel case with spaces - but I want multiple captitals to remain as one word. So I want "PerlNotesOnXML" -> "Perl Notes On XML" My attempt is to use [A-Z]+ in a lookahead. my $text = "PerlNotesOnXML" ; $text =~ s/(?=[A-Z]+)/ /gx ; print $text ; I

Re: Greedy v non greedy regexps in lookahead.

2008-11-23 Thread Mr. Shawn H. Corey
On Sun, 2008-11-23 at 11:52 +, Andrew wrote: > I am tying to expand some camel case with spaces - but I want multiple > captitals to remain as one word. So > I want "PerlNotesOnXML" -> "Perl Notes On XML" > > My attempt is to use [A-Z]+ in a lookahead. > > my $text = "PerlNotesOnXML" ; >