replaceText problem

Peter Haworth pete at lcsql.com
Thu Jan 8 19:22:32 EST 2015


On Tue, Jan 6, 2015 at 6:05 PM, Kay C Lan <lan.kc.macmail at gmail.com> wrote:

> LC uses the PCRE
> implementation of regex. Yes there are different flavours of regex which is
> why I like this online regex tester:
>
> https://regex101.com/#pcre
>

I've been using this site today to test out various examples while
modifying the Regex Builder plugin and I think I have come across a bug in
LC.

The following regex works in the web site.  It's also one of the examples
in the RegExhibit program and, naturally, works there too.

[the]{3}\s(\w+)\s.*?(?=;)

The regex matches the first occurrence of the word "the" followed by a
space followed by any number of words/spaces until a semicolon is found.

Using matchText in LC 6.5.2 it fails with error 301 pattern error.

If I remove "(?=;)", the error goes away but the match matches "the" and
just the next word.

Before I go to the QCC, any regex experts out there who can think why LC
would flag an error on this?

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>



More information about the use-livecode mailing list