[pugs] regexp ignore case

2005-04-14 Thread BRTHZI Andrs
Hi, Can you help me, how ignore case is working on Perl 5 regexps? my $test = 'test'; $test ~~ s:perl5:i/E/OA/; It gives me an error (replacing :i with :g, or just removing :i it works well). Bye, Andras

Re: [pugs] regexp ignore case

2005-04-14 Thread Markus Laire
BRTHZI Andrs wrote: Hi, Can you help me, how ignore case is working on Perl 5 regexps? my $test = 'test'; $test ~~ s:perl5:i/E/OA/; It gives me an error (replacing :i with :g, or just removing :i it works well). Until :i is implemented, you can use my $test = 'test'; $test ~~

Re: [pugs] regexp ignore case

2005-04-14 Thread Autrijus Tang
On Thu, Apr 14, 2005 at 01:07:32PM +0300, Markus Laire wrote: Until :i is implemented, you can use `:i` is now implemented in r1963: * :p5 allows as well as :perl5 for regex. * allow arbitary adverb orders. * :i / :ignorecase implemented. * /x and /s semantics are enabled for p5 regex by

Re: [pugs] regexp ignore case

2005-04-14 Thread Paul Seamons
I would think that :p5 should behave as perl5 does by default. That would mean that /x and /s aren't on by default (for p5). As this is my first post about pugs - all I can say is wow. It is great to already be coding perl6. Thanks Autrijus and crew. Paul On Thursday 14 April 2005 07:36

Re: [pugs] regexp ignore case

2005-04-14 Thread Larry Wall
On Thu, Apr 14, 2005 at 08:58:47AM -0600, Paul Seamons wrote: : I would think that :p5 should behave as perl5 does by default. That would : mean that /x and /s aren't on by default (for p5). I'm inclined to agree. Just as a heads up, I'm thinking of changing :perl5/:p5 to :Perl5/:P5 just to

Re: [pugs] regexp ignore case

2005-04-14 Thread Autrijus Tang
On Thu, Apr 14, 2005 at 09:51:27AM -0700, Larry Wall wrote: On Thu, Apr 14, 2005 at 08:58:47AM -0600, Paul Seamons wrote: : I would think that :p5 should behave as perl5 does by default. That would : mean that /x and /s aren't on by default (for p5). I'm inclined to agree. Okay. In that

Re: [pugs] regexp ignore case

2005-04-14 Thread Larry Wall
On Fri, Apr 15, 2005 at 01:25:24AM +0800, Autrijus Tang wrote: : Okay. In that case, how about making Perl5ish adverbs work when :P5 is : specified? I have just checked in some code to make this work: : : rx:P5:i:m:s:x:g/.../ : : Does it make sense to you? That means that we either have

Re: [pugs] regexp ignore case

2005-04-14 Thread Autrijus Tang
On Thu, Apr 14, 2005 at 11:03:56AM -0700, Larry Wall wrote: That means that we either have to have an order dependency or be very careful not to allow any P6 shortcuts that happen to use the deprecated Perl 5 modifiers. Perhaps it would be better to have an option argument to P5 instead: