Front page | perl.perl6.language |
Postings from August 2010
RE: regex and
Thread Previous
|
Thread Next
From:
philippe.beauchamp
Date:
August 10, 2010 12:01
Subject:
RE: regex and
Message ID:
3823C3443A7CA34BA4338754939C12E70131EBA518@MBX08.bell.corp.bce.ca
Back to your original advice...
> If you want to match an alphabetic string which does not include 'abc'
> anywhere, you can write this as
>
> ^ [ <!abc> <alpha> ]* $
I presume this only works here because <alpha> is one character... if instead of <alpha> I used anything more complicated
(for example)
token name
{
<[A..Z]><alpha>*
}
And then tried to do ^ [ <!abc> <name> ]* $
This wouldn't work since there's a wildcard within name.
Once the & operator is in rakudo, though... I gather I /could/ do something like the following
^ [ <!abc>* & <name> ] $
And this would in effect ensued that the sequence "abc" doesn't exist anywhere across the match for <name>
Is this correct?
Thread Previous
|
Thread Next