On Mon, Oct 07, 2002 at 07:11:08AM -0500, [EMAIL PROTECTED] wrote:
> > match negative multi-byte strings
>
>
> in perl5, I'd tend to do
>
> m/(?:(?!union).)*/is
>
> or to capture
>
> m/((?:(?!union).)*)/is
yeah, I'm not arguing that there isn't a solution available, just that the
so
> match negative multi-byte strings
in perl5, I'd tend to do
m/(?:(?!union).)*/is
or to capture
m/((?:(?!union).)*)/is
I suppose you could use union\b instead of union if you wanted allow
'unions' but disallow 'union'. The general idea is "gobble up each
character that isn't the
> On 1 Oct 2002 at 18:47, [EMAIL PROTECTED] wrote:
>
> > > > all text up to, but not including the string "union".
How about (Perl6)
/(.*?) union {$pos -= length('union');}/
This gets everything up to and including the first instance of 'union',
then gets rid of the bit at the end that w
On Wed, Oct 02, 2002 at 10:39:17AM +0300, Markus Laire wrote:
> On 1 Oct 2002 at 18:47, [EMAIL PROTECTED] wrote:
>
> > > > all text up to, but not including the string "union".
> > >
> > > rule getstuffbeforeunion { (.*?) union | (.*) }
> > >
> > > "a union" => "a "
> > > "b" => "b"
> >
> > hmm
On 1 Oct 2002 at 18:47, [EMAIL PROTECTED] wrote:
> > > all text up to, but not including the string "union".
> >
> > rule getstuffbeforeunion { (.*?) union | (.*) }
> >
> > "a union" => "a "
> > "b" => "b"
>
> hmm... well, it works, but its not very efficient. It basically
> scans the whole st
On Tue, Oct 01, 2002 at 05:24:43PM -0400, Peter Behroozi wrote:
> On Tue, 2002-10-01 at 16:44, [EMAIL PROTECTED] wrote:
> > doesn't work (just tried it out, not sure why it doesn't) but even if it did,
> > it would be awful slow. It would try one character, look at the next for the
> > string uni
On Tue, Oct 01, 2002 at 06:32:07PM -0400, Mike Lambert wrote:
> > guaranteeing that the subsqls have all text up to, but not including the string
> > "union".
> >
> > I suppose I could say:
> >
> > rule nonunion { (.*) :: { fail if ($1 =~ m"union$"); } }
>
> What's wrong with: ?
>
> rule get
On Tue, 2002-10-01 at 15:24, Luke Palmer wrote:
> Maybe I'm misundertanding the question, but I think you want negative
> lookahead:
>
> Perl 5: /(.*)(?!>union)/
You really meant to say
Perl 5: /((?:(?!union).))*/
# Match characters that do not begin the word 'union'
Right?
Peter
> guaranteeing that the subsqls have all text up to, but not including the string
> "union".
>
> I suppose I could say:
>
> rule nonunion { (.*) :: { fail if ($1 =~ m"union$"); } }
What's wrong with: ?
rule getstuffbeforeunion { (.*?) union | (.*) }
"a union" => "a "
"b" => "b"
Am I miss
[EMAIL PROTECTED] (Jonathan Scott Duff) writes:
> I think what you want is just a negated assertion:
>
> /+/
>
> Although I don't know what that means exactly.
That matches more than one thing that is not the string "union".
"u" is not the string "union"; "n" is not the string "union"...
On Tue, Oct 01, 2002 at 12:47:24PM -0700, [EMAIL PROTECTED] wrote:
> On Tue, Oct 01, 2002 at 01:24:45PM -0600, Luke Palmer wrote:
> >
> > > [Negative matching]
> >
> > > a generic negative, multi-byte string matching mechanism. Any thoughts?
> > > Am I missing something already present or other
On Tue, Oct 01, 2002 at 01:24:45PM -0600, Luke Palmer wrote:
>
> > [Negative matching]
>
> > a generic negative, multi-byte string matching mechanism. Any thoughts?
> > Am I missing something already present or otherwise obvious?
>
> Maybe I'm misundertanding the question, but I think you want
12 matches
Mail list logo