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....

>From http://quality.runrev.com/show_bug.cgi?id=12439

> 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 <j...@splash21.com> 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 ..
> 
> http://quality.runrev.com/show_bug.cgi?id=11391
> 
> 
> 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@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

--
Charles E. Buchwald
CEO/Director General
Museografica Digital
http://digital.museografica.com

Mac OSX 10.9.4, LC 6.6.2 Commercial

LC Developer Tools: http://buchwald.ca/developer-tools/

Email Notice: http://wp.me/P3aT4d-33


_______________________________________________
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

Reply via email to