Re: Re: Regex negative lookahead not working in LC?

2023-08-19 Thread Andreas Bergendal via use-livecode
> Nope.
> https://quality.livecode.com/show_bug.cgi?id=21534

Oh no! Well, cumbersome workaround it is then…
Thanks Jacque!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Regex negative lookahead not working in LC?

2023-08-19 Thread J. Landman Gay via use-livecode

Nope.
https://quality.livecode.com/show_bug.cgi?id=21534
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On August 19, 2023 10:39:52 AM Andreas Bergendal via use-livecode 
 wrote:


Why? Doesn't negative lookahead work in LC? (v9.6.9 stable.)





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Regex negative lookahead not working in LC?

2023-08-19 Thread Andreas Bergendal via use-livecode
Hi all,

I’m trying to run a matchChunk regex on an LC script text, with the aim of 
scoring a hit only if a word is NOT commented out by one of the comment methods.

This regex works beautifully when tested in regex101.com (PCRE flavor):

(?i)^(?:(?!--|#|\/\/).)*\b(myHandler)\b

When applied on the text

command myOtherHandler
   # myHandler
  // myHandler
  -- myhandler
  notMyHandler
end myOtherHandler

it should score zero matches and it does.


When applied on the text

command myOtherHandler
   # myHandler
  // myHandler
  -- myhandler
   myHandler
end myOtherHandler

it should score 1 match and it does.

Applying the same regex in LC does NOT score any match in the latter example 
though.

Why? Doesn't negative lookahead work in LC? (v9.6.9 stable.)

Best,
Andreas
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode