REGEX and Livecode

Richmond richmondmathewson at gmail.com
Mon Dec 31 10:07:26 EST 2012


On 12/31/2012 03:40 PM, David C. wrote:
> On Mon, Dec 31, 2012 at 4:55 AM, Richmond <richmondmathewson at gmail.com> wrote:
>> Sorry chaps to start a new thread on this, but, somehow lost track of the
>> last one :(
>>
>> Having 'swallowed my pride' and accepted that there MIGHT be more to REGEX
>> than
>> pattern matching, as I outlined in earlier postings, I had a look at the
>> URLs various people on the
>> Use-List provided:
>>
>> Finding this one fairly thought provoking:
>> http://www.regular-expressions.info/quickstart.html
>>
>> My thoughts were provoked in 2 ways:
>>
>> 1. REGEX seems useful.
>>
>> 2. How does one use REGEX within Livecode (and, my inevitable rider;
>> cross-platform) ?
>>
>> Because REGEX expressions do NOT seem to be written in whatever name
>> the RR/LC language is going by at the moment (HyperTalk, MetaTalk, RevTalk,
>> Transcript,
>> Revolution. Livecode ???).
>>
>> Now, as a mono-maniac for Livecode (i.e. I don't use any other programming
>> languages
>> on a regular basis) I am only going to go to the bother (and there does seem
>> to be quite a bit of that)
>> to learn REGEX if:
>>
>> 1. It can be, somehow, integrated into Livecode.
>>
>> 2. It will serve me better than the way I am doing things at the moment
>> (pace earlier postings).
>>
>> Call me "an awkward sausage" if you will; but, I suspect that those thoughts
>> may, in part at least,
>> reflect the thoughts of a lot of the "silent masses" who would like to do
>> all sorts of jolly data
>> sorting and/or modification with Livecode.
>>
>> Further to this, I would like to point out this:
>>
>> http://lessons.runrev.com/s/lessons/m/4603/l/44092-working-with-text
>>
>> [ admittedly it does not, directly, refer to unicodeText fields; but that,
>> as I have already found out,
>> can be dealt with comparatively easily ]
>>
>> which makes me wonder why one needs to go and "bang one's head against the
>> wall" of REGEX.
> Hi Richmond,
> RegEx has been incorporated directly into LiveCode since at least the
> version 2.5 days which is where I came aboard.

Hey! I missed something, again! Well, well, well :)

> There is a very brief
> "guide" starting on page 181 of the current Userguide which shows the
> usage in LC without any depth for learning RegEx itself.
>
> As to the "why" of RegEx... I can say that in other languages where it
> has been incorporated, I've seen some wildly complex, almost mind
> boggling text processing done with one single line of RegEx code.
>
> With all of that said, I still personally enjoy (and prefer) the more
> often used text processing capabilities of LC, far more than anything
> else I've ever tried.

Having looked briefly at REGEX I am inclined to agree, and would
only use it if I couldn't work out another way round something.

Wishing you (and everybody else on the Use-List) a Happy New Year untroubled
with the niceties of stuff like REGEX!

Richmond.

>
> Regards,
> David C.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list