Search found 2757 matches

by mwieder
Sun Jul 14, 2019 5:10 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

While you're thinking...

maybe you could post what your real-world problem is. It's hard to craft a generic solution without knowing the parameters. Do you really have something like 1235ABCD1288ABCD in the corpus of the text you're working with or is this just blue-skying?
by mwieder
Sun Jul 14, 2019 3:33 am
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

Yeah, you have to run matchtext() more times in the faster solution; so my guess is that matchtext on a single word is going to be faster than running matchtext on the entire text to see if there's a hit. What I still don't get is this: if you need to go through the entire text looking for hits and ...
by mwieder
Sat Jul 13, 2019 6:24 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

Yeah, mine too. But the problem with this approach for this situation is that if you've already located the text objects you want to delimit with non-printable characters then you've already solved the problem of you're trying to solve by delimiting them and you might as well convert them in situ.
by mwieder
Fri Jul 12, 2019 9:30 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

Yep - same problem. Using "trueword" ignores punctuation, so the punctuation (period, comma, crlf, etc) never makes the comparison list and gets lost.
by mwieder
Fri Jul 12, 2019 8:39 pm
Forum: Raspberry Pi
Topic: Coming in 9.x
Replies: 19
Views: 1178

Re: Coming in 9.x

It's not well documented but Yamil is a programming language for music
OK - I stand corrected. Do you have a link for this? My searches are coming up empty.
by mwieder
Fri Jul 12, 2019 5:24 pm
Forum: Raspberry Pi
Topic: Coming in 9.x
Replies: 19
Views: 1178

Re: Coming in 9.x

Yamil is a thing.
It is, but not the way you're thinking of it.

Code: Select all

https://www.facebook.com/Yamilofficial/
Yaml is a thing.

Code: Select all

https://en.wikipedia.org/wiki/YAML
by mwieder
Fri Jul 12, 2019 5:19 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

Well, as you so aptly said,
nulla facilisi.
by mwieder
Fri Jul 12, 2019 5:12 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

That opens up other problems: by-word instead of by-item removes the crlfs so you'd have to add extra code to take care of that. There's still the problem of the target text being at the end of a sentence because periods would be removed from the converted text: Lorem ipsum dolor sit 1235ABCD feugai...
by mwieder
Fri Jul 12, 2019 4:29 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

@Kaveh-
what if there was no space before and after the string?
All I have to work with is the text in the sample you posted. I have no idea what your real-world context might be like. The regex might have to be tweaked if you have other restrictions.
by mwieder
Fri Jul 12, 2019 4:25 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

Locking messages wouldn't have any effect here because there aren't any side effects that would invoke any other messages. My guess about the speed increase: The matchtext function is notoriously slow, and is described that way in the dictionary notes. But it does allow you to use regex in the match...
by mwieder
Fri Jul 12, 2019 2:24 am
Forum: Raspberry Pi
Topic: Coming in 9.x
Replies: 19
Views: 1178

Re: Coming in 9.x

idk - I'm not even sure what an "LC Global/Monthly report" is.
by mwieder
Fri Jul 12, 2019 2:23 am
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

OK - this gets it down to about 250 milliseconds on my computer (moved tReplaced to a script variable and lock screen before calling the function, unlock afterwards): function convertBackwards2 pInputString local tNumber, tText local tReturnString put 0 into sReplaced set the itemdelimiter to space ...
by mwieder
Thu Jul 11, 2019 11:29 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1365

Re: Implementing full regex in LiveCode

@Kaveh- Here you go: function convertBackwards pInputString local tNumber, tText repeat while matchtext(pInputString, " (\d+)([A-Z]+) ", tNumber, tText) replace (space & tNumber & tText & space) with (space & tText && tNumber & space) in pInputString end repeat return pInputString end convertBackwar...
by mwieder
Thu Jul 11, 2019 11:21 pm
Forum: Raspberry Pi
Topic: Coming in 9.x
Replies: 19
Views: 1178

Re: Coming in 9.x

OK - granted I don't hang around here very much, so I'm just coming across this now, but...
Raspberry Pi deployment?
by mwieder
Wed Jul 10, 2019 8:05 pm
Forum: Feature Requests
Topic: Error Messages
Replies: 23
Views: 740

Re: Error Messages

Heh. I was (re)watching Stop Making Sense last night and trying to remember the name of the song "Once In A Lifetime" even though it was repeated in the lyrics and then I'd get it and get wrapped up in the movie and forget again... but I digress (no surprise) I don't really care what the wording is,...

Go to advanced search