Standard Library

Charles E Buchwald charles at
Tue Aug 12 20:51:32 CEST 2014

Yes, but just having a more complete implementation of PCRE regex would make a big difference.
For example, LC's regex does not include back references.
Having the ability to use (PCRE compliant) back references would, I believe, in many case, eliminate the need for that array of matches.
For example....


> The dictionary says "LiveCode implements regular expressions compatible with the PCRE library." Without back references the LC implementation is a rather limited subset of that library.
> Example:
> I would expect to be able to do this in the message box:
> put replaceText("abcd","(ab)(cd)","$2$1")
> and get this:
> "cdab"
> Instead I have to do this:
> if matchText("abcd","(ab)(cd)",var1,var2) then put var2 & var1
> But this is a trivial example. If either my string to search or my pattern is slightly more complex, then what would be a trivial task with full PCRE compliant regex becomes comparatively complicated in LC.

On 12 Aug 2014, at 3:56 AM, John Craig <john at> wrote:

> Agree - matchText and matchChunk would both benefit from the ability to specify an array to fill with matches - we don't always know exactly how many will appear ..
> On 12/08/2014 02:12, Peter Haworth wrote:
>> I've always kinda thought the return variable parm to matchText was a little strange as it relies on you knowing how many matches will be found in advance. It would be great if the returned variable could be an array keyed by the numeric match number, alike the variables you can supply to the some of the database functions.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Charles E. Buchwald
CEO/Director General
Museografica Digital

Mac OSX 10.9.4, LC 6.6.2 Commercial

LC Developer Tools:

Email Notice:

More information about the use-livecode mailing list