on
this list some time ago. However, s/.../../ is still valid.
I'm not in favor of the so-called "short forms" having a different
syntax from the "long forms", and I personally like the current syntax
for both. That said, all's fair if you predeclare: I could see
so
I have two questions/suggestions regarding regex syntax:
1)
The :ii modifier is influenced by :sigspace modifier.
IMHO this is ugly, because the matching part and the replacement part of a
regex should be as orthogonal as possible.
Therefore I'd like a different syntax for :ii :sigspace,
> "AS" == Aaron Sherman <[EMAIL PROTECTED]> writes:
AS> On Mon, 2002-09-09 at 06:05, David Helgason wrote:
>>
>> Yeay! Golf...
>> If we are allowed to use all of perl6 in this particular (golf-)course,
>> I suggest:
AS> Clearly I've missed a reference at some point. Presumably
On Mon, Sep 09, 2002 at 05:02:18PM -0400, Aaron Sherman wrote:
> On Mon, 2002-09-09 at 06:05, David Helgason wrote:
> >
> > Yeay! Golf...
>
> > If we are allowed to use all of perl6 in this particular (golf-)course,
> > I suggest:
>
> Clearly I've missed a reference at some point. Presumably "
On Mon, 2002-09-09 at 06:05, David Helgason wrote:
>
> Yeay! Golf...
> If we are allowed to use all of perl6 in this particular (golf-)course,
> I suggest:
Clearly I've missed a reference at some point. Presumably "golf" is used
here to mean something like "stupid question".
> Perl6 will be a
[Moved over from p6i, to more appropriate p6l]
On Sat, 2002-09-07 at 12:03, Mr. Nobody wrote:
> While Apocolypse 5 raises some good points about problems with the old regex
> syntax, its new syntax is actually worse than in perl 5. Most regexes, such
> as this one to match
Yeay! Golf...
Adam D. Lopresto wrote:
[...golf...]
> /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/ #50 chars
[...more golf...]
> Of course, that's because we use perl6's strengths.
>
> :i/^(+|-)?(\d*[\.\d*]?)<($2=~/./)>[E([+|-]?\d+)]?$/ #51
Clever! But
If we are allowed to
antissa isn't empty, making the new perl6 code actually shorter than the
(correct) perl5 version. Of course, that's because we use perl6's strengths.
:i/^(+|-)?(\d*[\.\d*]?)<($2=~/./)>[E([+|-]?\d+)]?$/#51
> While Apocolypse 5 raises some good points about proble
On Fri, 6 Sep 2002, Mr. Nobody wrote:
> While Apocolypse 5 raises some good points about problems with the old regex
> syntax, its new syntax is actually worse than in perl 5. Most regexes, such
> as this one to match a C float
>
> /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+
agments to use a sub-rule because
repeated constants make things harder to read. (Not so bad
in this case, but it's a good general rule -- and you're making
generalizations about regex syntax.)
/^?\d*[\.\d*]?[:i e?\d+]?$/
I'd put in some white space to clarify the different logi
While Apocolypse 5 raises some good points about problems with the old regex
syntax, its new syntax is actually worse than in perl 5. Most regexes, such
as this one to match a C float
/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/
would actually become longer:
/^(<[+-]>?)\d*(\.\d*)
On Tue, Jul 02, 2002 at 03:59:57PM -0500, Allison Randal wrote:
>
> The parens in #3, C<< <( code )> >>, make sense if you think of
s/3/2/
Allison
re what we would expect from a block than just
getting a "truth" value). Think of it as analogous to C<< <$pat> >>,
only the value of $pat is returned instead of pre-existing within a
variable.
And, C< $( code ) > fits nicely with the general (non-regex) syntax for
interpolating a scalar expression.
Allison
Current p6 rx syntax aiui regarding embedded code:
/
#1 do (may include an explicit fail):
{ code }
#2 do with implicit 'or fail'
<( code )>
#3 interp lit:
$( { code } )
#4 interp as rx:
<{ code }>
/
This feels cryptic. Do we need abbreviated syntax for
Damian Conway <[EMAIL PROTECTED]> writes:
> Of course, that example might in itself be sufficient reason
> to completely redesign the regex syntax!
Perl uses the term "pattern matching" since day one. This opens the
possibility of extending pattern matching with other,
15 matches
Mail list logo