Re: Filter with wildcards

2023-11-02 Thread Neville Smythe via use-livecode
Users should certainly never see regex! That’s covered in User Interface Guidelines 101. But surely you wouldn’t show them the LC wildcard filter either! $@%?$@%?$@%?$@%?$@%?$@%?$@%?$@%? Neville Smythe Director, International Go Federation VicePresident, Australian Go Association Inc. > On 3

Re: Filter with wildcards

2023-11-02 Thread David Glasgow via use-livecode
> On 1 Nov 2023, at 11:24 pm, Neville Smythe > wrote: > > But I suspect you should allow for the required strings to be followed by > punctuation or be at the end of the line, things which are hard to do with a > simple LC wildcard search, at least in a single filter. When I originally

Re: Filter with wildcards

2023-11-01 Thread Neville Smythe via use-livecode
I agree David, regular expressions look intimidating at first sight. But in fact if you compare your intuitive attempt filter tList with “*with [you,u] *” with the regex which does what you set out to do filter tList with regex “.*with (you|u) .*” they are almost exactly the same – for very

Re: Filter with wildcards

2023-11-01 Thread David V Glasgow via use-livecode
This is the thing about regex, amazing,powerful, impressive, but scary as hell. I will play with this a little, though… so thanks for your time when you should have been doing something else. I appreciate it. Best Wishes, David Glasgow Consultant Forensic & Clinical Psychologist Carlton

Re: Filter with wildcards

2023-11-01 Thread David Glasgow via use-livecode
Thanks all for the suggestions, folks. I expected someone to mention regex (shudder). I have many searches in a loop and most are simple strings, so excepting regex filters would be a bit of a pain (unless of course I could specify regex but this would not choke if the search was simple

Re: Filter with wildcards

2023-10-31 Thread Neville Smythe via use-livecode
Forgot any number of other chars after the non-numeric character Filter tList with regex "(?i).*with (you|u)([^a-zA-Z].*|$)” Now I’ve really got to go … hope I’ve got it all right this time! Neville Smythe ___ use-livecode mailing list

Re: Filter with wildcards

2023-10-31 Thread Neville Smythe via use-livecode
Filter tList with regex "(?i).*with (you|u)( .*|\.|$)" I did forget something … wth you might be folllowed by a comma or colon or something so the last brackets should search for either any non alphabetic character or the end of line, so think (going from memory here) Filter tList with regex

Re: Filter with wildcards

2023-10-31 Thread Neville Smythe via use-livecode
Reglar expressions is definitely the way to go So you want to catch any number of characters .* Followed by the string “with “ .*with Followed by either “you” or “u” .*with (you|u) Followed by a space and then any umber of characters, giving .*with (you|u) .* Except you might want to look for

Re: Filter with wildcards

2023-10-30 Thread Mark Waddingham via use-livecode
The filter command has had a ‘with[out] regex’ form for a long time - so I’d use a regex instead :) (I’m pretty sure [ ] is a set of characters to match, rather than a list of sub strings, in wildcard expressions) Warmest Regards, Mark. Sent from my iPhone > On 30 Oct 2023, at 17:19, David

Re: Filter with wildcards

2023-10-30 Thread Richmond Mathewson via use-livecode
I think that matchText is what you are looking for. I have a proof stack which I shall upload to the forums, as obviously this is not possible here: https://forums.livecode.com/viewtopic.php?f=7=38698 Best, Richmond Mathewson. On 30.10.23 19:17, David Glasgow via use-livecode wrote: Hi

Re: Filter with wildcards

2023-10-30 Thread Richmond Mathewson via use-livecode
Oddly enough a matchChunk expression with "with you$" pulls out all the 'with you' stuff and excludes this sort of thing: 'with youthful naivety' . . . which is marvellous But a matchChunk expression with "with u$" catches nothing! On 30.10.23 20:11, Craig Newman via use-livecode wrote: Have

Re: Filter with wildcards

2023-10-30 Thread Richmond Mathewson via use-livecode
OK: well I had a bash with a set like this: with unlimited cheese with you with u with udders clagged with glaur with youthful naivety and your filter grabbed all of them. :( I tried this: with"with [you, u,]*" and got the same. On reading in the dictionary I found this: filtertVar

Re: Filter with wildcards

2023-10-30 Thread Craig Newman via use-livecode
Have not played with a method of keeping it all in one line. But can you filter twice, storing the first result and then running it again? Craig > On Oct 30, 2023, at 1:17 PM, David Glasgow via use-livecode > wrote: > > Hi folks, > > I am doing the above and struggling with an oddity that I

Re: filter

2020-11-20 Thread Bob Sneidar via use-livecode
Yeah, not confusing at all. ;-P Bob S On Nov 20, 2020, at 9:55 AM, Mark Wieder via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: On 11/20/20 3:27 AM, David V Glasgow via use-livecode wrote: Apologies for barging in, but I am confused by regex generally and in this specific

Re: filter

2020-11-20 Thread Mark Wieder via use-livecode
On 11/20/20 3:27 AM, David V Glasgow via use-livecode wrote: Apologies for barging in, but I am confused by regex generally and in this specific example by the function of the terminal ‘+’ If you are only finding one character, why do you need to specify 'at least one' of one char? Ha!

Re: filter

2020-11-20 Thread David V Glasgow via use-livecode
Apologies for barging in, but I am confused by regex generally and in this specific example by the function of the terminal ‘+’ If you are only finding one character, why do you need to specify 'at least one' of one char? Cheers David G > On 20 Nov 2020, at 8:44 am, Klaus major-k via

Re: filter

2020-11-20 Thread Klaus major-k via use-livecode
Hi Mark, > Am 20.11.2020 um 00:55 schrieb Mark Wieder via use-livecode > : > On 11/19/20 9:09 AM, Klaus major-k via use-livecode wrote: >> Hi Mark, >>> Am 19.11.2020 um 18:07 schrieb Mark Wieder via use-livecode >>> : >>> On 11/19/20 7:38 AM, Mark Waddingham via use-livecode wrote: I

Re: filter

2020-11-19 Thread Mark Wieder via use-livecode
On 11/19/20 9:09 AM, Klaus major-k via use-livecode wrote: Hi Mark, Am 19.11.2020 um 18:07 schrieb Mark Wieder via use-livecode : On 11/19/20 7:38 AM, Mark Waddingham via use-livecode wrote: I think: filter fld 1 with "[[]*" Should do the trick... As an alternative, filter fld 1 with

RE: filter

2020-11-19 Thread Craig newman via use-livecode
Klaus. I use "filter" here and there, mostly with regex or wildCards. But nothing works for me either,: Filter yourText with "[" Filter yourText where each contains "[" Not sure what is going on. Where is Thieery? Craig -Original Message- From: use-livecode

Re: filter

2020-11-19 Thread Bob Sneidar via use-livecode
I don’t think I could watch! Oh the horror! Bob S > On Nov 19, 2020, at 9:17 AM, Keith Clarke via use-livecode > wrote: > > The chronicles of regex - a potential blockbuster there, Bob! :-) > Best, > Keith > >> On 19 Nov 2020, at 16:49, Bob Sneidar via use-livecode >> wrote: >> >> No

Re: filter

2020-11-19 Thread Keith Clarke via use-livecode
The chronicles of regex - a potential blockbuster there, Bob! :-) Best, Keith > On 19 Nov 2020, at 16:49, Bob Sneidar via use-livecode > wrote: > > No one escapes the lair of the Regex Demon. Except for maybe Riddick. > > Bob S > > > On Nov 19, 2020, at 8:15 AM, Keith Clarke via

Re: filter

2020-11-19 Thread Klaus major-k via use-livecode
Hi Mark, > Am 19.11.2020 um 18:07 schrieb Mark Wieder via use-livecode > : > On 11/19/20 7:38 AM, Mark Waddingham via use-livecode wrote: >> I think: >> filter fld 1 with "[[]*" >> Should do the trick... > As an alternative, > filter fld 1 with regex pattern "^\[+" > also does the trick.

Re: filter

2020-11-19 Thread Mark Wieder via use-livecode
On 11/19/20 7:38 AM, Mark Waddingham via use-livecode wrote: I think:   filter fld 1 with "[[]*" Should do the trick... As an alternative, filter fld 1 with regex pattern "^\[+" also does the trick. -- Mark Wieder ahsoftw...@gmail.com ___

Re: filter

2020-11-19 Thread Bob Sneidar via use-livecode
No one escapes the lair of the Regex Demon. Except for maybe Riddick. Bob S On Nov 19, 2020, at 8:15 AM, Keith Clarke via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Ha, yes I understand that desire - and Mark’s one-character escape trick beats my hack to bypass the lair of

Re: filter

2020-11-19 Thread Keith Clarke via use-livecode
Ha, yes I understand that desire - and Mark’s one-character escape trick beats my hack to bypass the lair of the regex demon! :D Best, Keith > On 19 Nov 2020, at 15:51, Klaus major-k via use-livecode > wrote: > > Hi Keith, > >> Am 19.11.2020 um 16:38 schrieb Keith Clarke via use-livecode >>

Re: filter

2020-11-19 Thread Klaus major-k via use-livecode
Hi Keith, > Am 19.11.2020 um 16:38 schrieb Keith Clarke via use-livecode > : > > Hi Klaus, > Maybe iterate the lines - untested... > repeat for each line l in fld 1 > if and( offset( “[“, l) > 0 , offset(“]”, l) > 0 ) then put line l of fld 1 > into tList > end repeat > put tList yes, sure,

Re: filter

2020-11-19 Thread Klaus major-k via use-livecode
Hi Mark, > Am 19.11.2020 um 16:38 schrieb Mark Waddingham via use-livecode > : > >> So I thought >> ... >> filter fld 1 with "[*" >> ... >> would do the job, but that EMPTIES the field!? >> Obviously this [ interferes with some REGEX mechanism of filter? >> So what should I use now? > I think:

Re: filter

2020-11-19 Thread Keith Clarke via use-livecode
Hi Klaus, Maybe iterate the lines - untested... repeat for each line l in fld 1 if and( offset( “[“, l) > 0 , offset(“]”, l) > 0 ) then put line l of fld 1 into tList end repeat put tList Best, Keith > On 19 Nov 2020, at 15:19, Klaus major-k via use-livecode > wrote: > > Hi all, > > I

Re: filter

2020-11-19 Thread Mark Waddingham via use-livecode
So I thought ... filter fld 1 with "[*" ... would do the job, but that EMPTIES the field!? Obviously this [ interferes with some REGEX mechanism of filter? So what should I use now? I think: filter fld 1 with "[[]*" Should do the trick... Basically, you can use '[...]' to 'escape' the

Re: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
Mark Talluto's bug is exactly what I see. It may be related to a certain type of scripting, or a particular sequence of commands. I crashed several times in a row within a minute of a restart, so maybe the handler I was debugging was to blame. -- Jacqueline Landman Gay |

Re: Filter an array by content

2019-06-21 Thread Bob Sneidar via use-livecode
I am using V9.0.5 rc1 and I am not having any of these kinds of debugging crashes. I rarely step over though. Almost always I step into or out of. (I think I have that right.) Bob S > On Jun 21, 2019, at 14:33 , J. Landman Gay via use-livecode > wrote: > > On 6/21/19 2:48 PM, Alex Tweedly

Re: Filter an array by content

2019-06-21 Thread Mark Talluto via use-livecode
On Jun 21, 2019, at 2:33 PM, J. Landman Gay via use-livecode wrote: > > I see that all the time. If you step over, the dot location fixes itself at > least here. Until the crash, anyway. It doesn't crash right away, it seems to > be a cumulative thing, so you get a few chances before

Re: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
On 6/21/19 2:48 PM, Alex Tweedly via use-livecode wrote: On 21/06/2019 19:38, J. Landman Gay via use-livecode wrote: My only excuse is that I've been avoiding stepping through the debugger because LC has been crashing when I do that. I've sent in many crash logs but it's only recently I've

Re: Filter an array by content

2019-06-21 Thread Bob Sneidar via use-livecode
Yes it is in memory, but it makes me think there might be a use case for allowing the creation of a file based database. I'll update it and repost on the list. Bob S > On Jun 21, 2019, at 12:57 , Tom Glod via use-livecode > wrote: > > very good thanks for elaborating Bob...it makes

Re: Filter an array by content

2019-06-21 Thread Tom Glod via use-livecode
very good thanks for elaborating Bob...it makes sense that there are use cases where the library really kicks it.. esp since its an in memory database (assuming). Its a good idea, making me rethink a couple of things. On Fri, Jun 21, 2019 at 12:06 PM Alex Tweedly via use-livecode <

Re: Filter an array by content

2019-06-21 Thread Alex Tweedly via use-livecode
On 21/06/2019 19:38, J. Landman Gay via use-livecode wrote: My only excuse is that I've been avoiding stepping through the debugger because LC has been crashing when I do that. I've sent in many crash logs but it's only recently I've discovered it happens only with Step Over. It's hard to

Re: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
Found the problem. My script local was being emptied for some reason, so there was nothing to filter. After repopulating all data it worked. My only excuse is that I've been avoiding stepping through the debugger because LC has been crashing when I do that. I've sent in many crash logs but

Re: Filter an array by content

2019-06-21 Thread Alex Tweedly via use-livecode
Hi Bob, It sounds like your library is something I could benefit from :-) I know it's been mentioned on the list before, but I've lost track of where to get it from, and  a quick search didn't turn anything up. Could you please send a reminder (either to the list or direct to me if you

Re: Filter an array by content

2019-06-21 Thread Bob Sneidar via use-livecode
Hi Tom. So the little benchmarking I did originally showed that my method was a little longer, as I still have to iterate once through the array to populate the database. Where it really shines is that you can do complex queries, as well as multiple column sorts before converting back to an

Re: Filter an array by content

2019-06-21 Thread Dar Scott Consulting via use-livecode
I wonder whether explicitly specifying "wildcard pattern" would fix this. (I misread your query as referring to arrays with numeric elements, not arrays with numeric keys. Thus, my fascination with the new "where" where one can use "each > 22.2". Even with your use, "where" might be

Re: Filter an array by content

2019-06-21 Thread Niggemann, Bernd via use-livecode
Am 21.06.2019 um 09:01 schrieb use-livecode-requ...@lists.runrev.com: From: "J. Landman Gay" I spoke too soon. When I tested, I hard-coded a value as the filter string. But when I use a variable, it fails as it did before. The elements of the

Re: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
I spoke too soon. When I tested, I hard-coded a value as the filter string. But when I use a variable, it fails as it did before. The elements of the array all start with a 4-character string followed by an underscore, for example: ER01_some text here My variable contains "ER01": put tVar

Re: Filter an array by content

2019-06-21 Thread J. Landman Gay via use-livecode
Thanks to all for the replies. Monte, I didn't see your post until Tom quoted it, for some reason it didn't arrive here. At any rate, I'd already tried "filter elements of..." and it failed which is why I posted. But I must have had my filter wrong because I just tried it again and it worked.

Re: Filter an array by content

2019-06-20 Thread Tom Glod via use-livecode
A great question Jacque Helpful thread all around. I have a tendency to think that any operation i perform to convert an entire array into something else will take longer than to loop through the keys. I'm happy to be wrong ,and I imagine it depends on the number of items in the dataset. But

Re: Filter an array by content

2019-06-20 Thread Monte Goulding via use-livecode
Hi Jacque, does the output also need to be a sequential numeric array? If so then no variant of the filter command will help. If not then can’t you `filter elements of theArray with “*foobar*”``? It would be a nice addition to filter elements to have `as sequence` or something so the result had

Re: Filter an array by content

2019-06-20 Thread Dar Scott Consulting via use-livecode
If LiveCode 9.5 is not applicable (since it is not released), then... If those numbers are codes taken from some small universe of codes, then maybe intersect will work: intersect affectedZipCodes with TreatedZipCodes into inspectionZipCodes But if you can go with 9.5, then maybe "where" will

Re: Filter an array by content

2019-06-20 Thread Dar Scott Consulting via use-livecode
I think the filtering of array items was introduced in 8.1, so combine and split might not be needed. However, unless pattern matching will do, one has to wait until 9.5 to use the "where" clause in "filter". > On Jun 20, 2019, at 3:37 PM, hh via use-livecode > wrote: > > Why not "combine

Re: Filter an array by content

2019-06-20 Thread Bob Sneidar via use-livecode
You would have to also sort. Also, the array might not be sorted after the split. Bob S > On Jun 20, 2019, at 14:37 , hh via use-livecode > wrote: > > Why not "combine array V > filter V > split V"? > >> JLG wrote: >> I need to filter a numeric array by the content of the keys, not by the

Re: Filter an array by content

2019-06-20 Thread hh via use-livecode
Why not "combine array V > filter V > split V"? > JLG wrote: > I need to filter a numeric array by the content of the keys, not by the > keys themselves. Is there a way to do that without looping through the > entire array and looking at each element?

Re: Filter an array by content

2019-06-20 Thread Bob Sneidar via use-livecode
This is the perfect scenario for my arrayToDB library. Convert array to sqLite DB, query the DB using SELECT * from WHERE ORDER BY CAST( AS decimal(10.2)) then convert the resulting cursor back to an array. Contact me offlist if interested. Bob S > On Jun 20, 2019, at 13:56 , J. Landman

Re: Filter an array by content

2019-06-20 Thread Dar Scott Consulting via use-livecode
In 9.5, perhaps, filter ... where will do it. > On Jun 20, 2019, at 2:56 PM, J. Landman Gay via use-livecode > wrote: > > I need to filter a numeric array by the content of the keys, not by the keys > themselves. Is there a way to do that without looping through the entire > array and

RE: filter list_of_files with REGEX xyz?

2018-08-17 Thread Ralph DiMola via use-livecode
LiveCode Cc: Bob Sneidar Subject: Re: filter list_of_files with REGEX xyz? Half want cake, the other half, pie. Bob S > On Aug 17, 2018, at 09:45 , Mark Wieder via use-livecode wrote: > > On 08/17/2018 08:54 AM, Ralph DiMola via use-livecode wrote: >> True true... I thought ab

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Bob Sneidar via use-livecode
Half want cake, the other half, pie. Bob S > On Aug 17, 2018, at 09:45 , Mark Wieder via use-livecode > wrote: > > On 08/17/2018 08:54 AM, Ralph DiMola via use-livecode wrote: >> True true... I thought about it but left it as is just in case there was an >> image without a file name before

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Mark Wieder via use-livecode
On 08/17/2018 08:54 AM, Ralph DiMola via use-livecode wrote: True true... I thought about it but left it as is just in case there was an image without a file name before the ".". I did not want it to be missed. You know users... LOL -- Mark Wieder ahsoftw...@gmail.com

RE: filter list_of_files with REGEX xyz?

2018-08-17 Thread Ralph DiMola via use-livecode
e-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Mark Wieder via use-livecode Sent: Friday, August 17, 2018 11:41 AM To: Ralph DiMola via use-livecode Cc: Mark Wieder Subject: Re: filter list_of_files with REGEX xyz? On 08/17/2018 07:13 AM, Ralph DiMola via use-livecode wrote

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Mark Wieder via use-livecode
On 08/17/2018 07:13 AM, Ralph DiMola via use-livecode wrote: filter tList with regex pattern "(?i).*\.(jpe?g|png|gif)$" For a file list that should probably be filter tList with regex pattern "(?i).+\.(jpe?g|png|gif)$" unless you explicitly want to see file names that start with "." --

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Lagi Pittas via use-livecode
I was going to send the whole line but Hermann has beaten me to it - and I will use his version from now on, thanks Hermann. Lagi On Fri, 17 Aug 2018 at 15:03, Klaus major-k via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Hermann, > > > Am 17.08.2018 um 15:58 schrieb hh via

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Lagi Pittas via use-livecode
rian Milby via use-livecode > Sent: Friday, August 17, 2018 9:19 AM > To: How to use LiveCode > Cc: Brian Milby > Subject: Re: filter list_of_files with REGEX xyz? > > RegEx pattern > Sorry, I was just giving the pattern, not the syntax. > Also, it will probably be case sensit

RE: filter list_of_files with REGEX xyz?

2018-08-17 Thread Ralph DiMola via use-livecode
code [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of hh via use-livecode Sent: Friday, August 17, 2018 9:58 AM To: use-livecode@lists.runrev.com Cc: hh Subject: Re: filter list_of_files with REGEX xyz? This is already case-insensitive, but the period needs an escape: filter tList with re

RE: filter list_of_files with REGEX xyz?

2018-08-17 Thread Brian Milby via use-livecode
gt; > -Original Message- > From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf > Of Brian Milby via use-livecode > Sent: Friday, August 17, 2018 9:19 AM > To: How to use LiveCode > Cc: Brian Milby > Subject: Re: filter list_of_files with REGEX x

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Klaus major-k via use-livecode
Hi Hermann, > Am 17.08.2018 um 15:58 schrieb hh via use-livecode > : > > This is already case-insensitive, but the period needs an escape: > > filter tList with regex pattern "\.*(jpe?g|png|gif)$" ah, jetzt ja! :-) Thanks a lot! Best Klaus -- Klaus Major http://www.major-k.de

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread hh via use-livecode
This is already case-insensitive, but the period needs an escape: filter tList with regex pattern "\.*(jpe?g|png|gif)$" ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your

RE: filter list_of_files with REGEX xyz?

2018-08-17 Thread Ralph DiMola via use-livecode
...@lists.runrev.com] On Behalf Of Brian Milby via use-livecode Sent: Friday, August 17, 2018 9:19 AM To: How to use LiveCode Cc: Brian Milby Subject: Re: filter list_of_files with REGEX xyz? RegEx pattern Sorry, I was just giving the pattern, not the syntax. Also, it will probably be case sensitive

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Klaus major-k via use-livecode
Hi Brian, > Am 17.08.2018 um 15:19 schrieb Brian Milby via use-livecode > : > > RegEx pattern > Sorry, I was just giving the pattern, not the syntax. > Also, it will probably be case sensitive in that format. My suffixes are all lower case, so this shouldn't matter here. > I won’t be able to

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Brian Milby via use-livecode
RegEx pattern Sorry, I was just giving the pattern, not the syntax. Also, it will probably be case sensitive in that format. I won’t be able to test until later. I don’t recall the case insensitive flag off hand. Thanks, Brian On Aug 17, 2018, 8:15 AM -0500, Klaus major-k via use-livecode ,

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Klaus major-k via use-livecode
Hi Brian, > Am 17.08.2018 um 14:40 schrieb Brian Milby via use-livecode > : > > Pattern “*.(jpe?g|png|gif)” thanks, but that does not work!? I tried: on mouseUp pMouseButton answer folder "sdsdsdsd" put it into tFolder put files(tFolder) into tList filter tList with pattern

Re: filter list_of_files with REGEX xyz?

2018-08-17 Thread Brian Milby via use-livecode
Pattern “*.(jpe?g|png|gif)” Thanks, Brian On Aug 17, 2018, 6:44 AM -0500, Klaus major-k via use-livecode , wrote: > Hi friends, > > I know how to: > ... > filter list_of_files with "*.jpg" > ... > But REGEX stuff is way over my head. :-/ > > Can anyone provide the regex/pattern syntax for

Re: filter? replace? wildcard? reg exp? help please!

2017-05-19 Thread Thierry Douez via use-livecode
​ Is there life without internet for one week? - lucky you are connected to the world again! > Tiemo > ​Hallo Tiemo, Except some hurdles with the administration ( sold my old car and bought a new one) plus being insulted by a couple of stressed and egotist people for not answering sooner, I

Re: filter? replace? wildcard? reg exp? help please!

2017-05-19 Thread Thierry Douez via use-livecode
> > >> put "1 [A] 2 [B] 3." into tText >> put removeBrackets( tText) >> > > I see that the middle section is omitted with my regex, so I forgot to > make it non-greedy. But I've forgotten how to do that, something about a > question mark, I think? ​Sorry about the delay, we had a thunderstorm

Re: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread J. Landman Gay via use-livecode
On 5/12/17 3:37 PM, Thierry Douez via use-livecode wrote: This should be a one-line command! I've typed this post with the new Opera browser ??? Another try with 2 lines: put "1 [A] 2 [B] 3." into tText put removeBrackets( tText) ​Better? Yes. It's odd that a browser would reformat it

Re: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread Thierry Douez via use-livecode
> > >> >> >>> function removeBrackets pString >>> return replacetext(pString,"\[.*\]",empty) >>> end removeBrackets >>> >> ​​ >> >> What would be the result of next line:? >> >> *put* removeBrackets >> ​( ​ >> "1 [A] 2 [B] 3." >> ​) >> > > An error. I did warn about my limited regex skills. :)

Re: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread J. Landman Gay via use-livecode
On 5/12/17 2:08 AM, Thierry Douez via use-livecode wrote: ​Hi, function removeBrackets pString return replacetext(pString,"\[.*\]",empty) end removeBrackets ​​ What would be the result of next line:? *put* removeBrackets ​( ​ "1 [A] 2 [B] 3." ​) An error. I did warn about my

Re: filter? replace? wildcard? reg exp? help please!

2017-05-12 Thread Thierry Douez via use-livecode
​Hi, > > function removeBrackets pString > return replacetext(pString,"\[.*\]",empty) > end removeBrackets > > ​​ What would be the result of next line:? *put* removeBrackets ​( ​ "1 [A] 2 [B] 3." ​) Kind regards, Thierry ​ Thierry Douez

Re: filter? replace? wildcard? reg exp? help please!

2017-05-10 Thread Nicolas Cueto via use-livecode
> Totally OT, but is this Dante, in Spanish?? Yes, and yes. From the verse translation of Ángel Crespo. -- Nicolas Cueto On 10 May 2017 at 19:57, Graham Samuel via use-livecode < use-livecode@lists.runrev.com> wrote: > Totally OT, but is this Dante, in Spanish?? > > Just askin’. I am not good

Re: filter? replace? wildcard? reg exp? help please!

2017-05-10 Thread Graham Samuel via use-livecode
Totally OT, but is this Dante, in Spanish?? Just askin’. I am not good with languages, as you can probably tell. Graham > On 10 May 2017, at 06:33, J. Landman Gay via use-livecode > wrote: > > On 5/9/17 11:16 PM, J. Landman Gay via use-livecode wrote: >> On

Re: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread J. Landman Gay via use-livecode
On 5/9/17 11:16 PM, J. Landman Gay via use-livecode wrote: On 5/9/17 10:41 PM, Nicolas Cueto via use-livecode wrote: Given this snippet... --- CANTO XXXIV CÍRCULO IX: TRAIDORES. «Vexilla regis prodeunt[307] del Abismo hacia nosotros[308], mas

Re: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Nicolas Cueto via use-livecode
​Thank you everyone. Went with ​Jacqueline's, cause fastest. -- N. Cueto ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Re: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread J. Landman Gay via use-livecode
On 5/9/17 10:41 PM, Nicolas Cueto via use-livecode wrote: Given this snippet... --- CANTO XXXIV CÍRCULO IX: TRAIDORES. «Vexilla regis prodeunt[307] del Abismo hacia nosotros[308], mas delante mira 3—dijo el maestro— y los verás tú mismo.»

Re: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Phil Davis via use-livecode
There is probably an easier way, but this works: on mouseUp put "]" & field 1 into tText set the lineDelimiter to "[" set the itemDelimiter to "]" repeat for each line tLine in tText put item 2 to -1 of tLine after tNewText end repeat

Re: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Peter Bogdanoff via use-livecode
Try— put your text into tText, then repeat forever if offset("[",tText) is not empty then delete char (offset("[",tText)) to (offset("]",tText)) of tText else exit repeat end repeat On May 9, 2017, at 8:54 PM, Peter Bogdanoff via use-livecode

Re: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Peter Bogdanoff via use-livecode
use offset. Peter On May 9, 2017, at 8:41 PM, Nicolas Cueto via use-livecode wrote: > Given this snippet... > > --- > CANTO XXXIV > CÍRCULO IX: TRAIDORES. > «Vexilla regis prodeunt[307] del Abismo > hacia

Re: Filter lines of a variable that start with...

2014-05-03 Thread Keith Clarke
…of course, it would have helped if I’d added the “*” wild card to the end of the filter - doh! :-) filter tSearchResultsHTML withli* Best, Keith.. On 3 May 2014, at 15:14, Keith Clarke keith.cla...@clarkeandclarke.co.uk wrote: Hi folks, I’m working on a little utility to analyse Google

Re: filter appears to work differently when single stepping

2013-09-12 Thread Klaus major-k
Hi Richard, Am 12.09.2013 um 18:26 schrieb Dr. Hawkins doch...@gmail.com: I have a global dhUpCds for a list of long names of cards that get updated. When a card closes, I want them removed I made a handler on dhRmUpCd oldCd global dhUpCds ## Try with parens: filter dhUpCds

Re: filter appears to work differently when single stepping

2013-09-12 Thread Dr. Hawkins
On Thu, Sep 12, 2013 at 9:32 AM, Klaus major-k kl...@major-k.de wrote: ## Try with parens: filter dhUpCds without (* oldCd) Thanks. THis may have done it. It also seems that the watch window for my variable does not get updated after the last iteration until I click on another

Re: filter with a tab character

2013-02-04 Thread Klaus on-rev
Hi Hugh, Am 04.02.2013 um 18:04 schrieb FlexibleLearning.com ad...@flexiblelearning.com: I have tab-delimited list and am trying to filter lines. Q1. How do we include a TAB character in the expression? Using filter with *\tsomeText fails. use the contant TAB: ... filter tList with (*

Re: filter with a tab character

2013-02-04 Thread Richard Gaskin
Klaus wrote: Am 04.02.2013 um 18:04 schrieb FlexibleLearning.com: I have tab-delimited list and am trying to filter lines. Q1. How do we include a TAB character in the expression? Using filter with *\tsomeText fails. use the contant TAB: ... filter tList with (* TAB whatever) While the

Re: filter with a tab character

2013-02-04 Thread Mike Bonner
I think you could also use \t to signify a tab char. As for the matching a range of numbers you'd probably be better served to have lc handle whatever is leftover. However, barring that, you might look at this page: http://www.regular-expressions.info/numericranges.html for an explanation of how

Re: filter with a tab character

2013-02-04 Thread Paul Hibbert
filter searches for a pattern, not a value, so this can work to filter anything 'less than 18', but would work to filter results with the chars , 1 or 8. Paul On 2013-02-04, at 9:04 AM, FlexibleLearning.com wrote: Q2. How do we specify a maximum numeric value? Using filter with *[18] fails.

Re: filter with a tab character

2013-02-04 Thread Paul Hibbert
Sorry, that should have read can't work not can work. On 2013-02-04, at 9:48 AM, Paul Hibbert wrote: filter searches for a pattern, not a value, so this can work to filter anything 'less than 18', but would work to filter results with the chars , 1 or 8. Paul On 2013-02-04, at 9:04

Re: filter with a tab character

2013-02-04 Thread Thierry Douez
2013/2/4 FlexibleLearning.com ad...@flexiblelearning.com I have tab-delimited list and am trying to filter lines. Q1. How do we include a TAB character in the expression? Using filter with *\tsomeText fails. see \s below Q2. How do we specify a maximum numeric value? Using filter with

Re: filter with a tab character

2013-02-04 Thread Thierry Douez
Forgot one which maybe you need: get \s([1-3]?\d|[4][0-2])\s -- accept 0 to 42 Regards, Thierry 2013/2/4 Thierry Douez th.do...@gmail.com 2013/2/4 FlexibleLearning.com ad...@flexiblelearning.com I have tab-delimited list and am trying to filter lines. Q1. How do we include a TAB

Re: filter with a tab character

2013-02-04 Thread FlexibleLearning.com
Thanks for the insights. Much appreciated. The list to filter is not enormous, but the 'for each' option would also handle any numeric evaluations, so both solutions will be valuable. Hugh Senior FLCo Klaus wrote: Am 04.02.2013 um 18:04 schrieb FlexibleLearning.com: I have tab-delimited

Re: Filter and the Question Mark (escaping ? in regex)

2013-01-24 Thread Thierry Douez
Hi Bob, You are wrong and right :) Right because that's how regex works in most environment. Wrong because regex inside Livecode behave sometimes in strange ways... Anyway, be happy. Thierry 2013/1/23 Robert Sneidar slylab...@me.com I mean Thierry I just checked this, and Malte is

Re: Filter and the Question Mark (escaping ? in regex)

2013-01-23 Thread Mark Schonewille
Malte, Try this: filter tText with *[?]* Kind regards, Mark On 1/23/2013 11:49 AM, Malte Brill wrote: Hi, I got a var tText that contains: asdf jkl? bcdk I want to do something like this filter tText with *\?* which should leave me with only jkl?. This does not appear to work. Any

Re: Filter and the Question Mark (escaping ? in regex)

2013-01-23 Thread Thierry Douez
Hi Malte, for any position of ? in a line: filter tText with *[?]* for the last char of a line: filter tText with *[?] Regards, Thierry 2013/1/23 Malte Brill revolut...@derbrill.de Hi, I got a var tText that contains: asdf jkl? bcdk I want to do something like this filter tText

Re: Filter and the Question Mark (escaping ? in regex)

2013-01-23 Thread Robert Sneidar
It's my understanding that * means 0 to any number of characters, in which case these are both the same thing. I might be wrong though. Might explain why some of my filtering is not working as expected. :-) Bob On Jan 23, 2013, at 3:30 AM, Thierry Douez wrote: Hi Malte, for any position

Re: Filter and the Question Mark (escaping ? in regex)

2013-01-23 Thread Robert Sneidar
I just checked this, and Malte is correct. I see now why the second example would only select lines ending in ?. I should probably remove expert in regex from my resume? ;-) Bob On Jan 23, 2013, at 3:30 AM, Thierry Douez wrote: Hi Malte, for any position of ? in a line: filter tText

Re: Filter and the Question Mark (escaping ? in regex)

2013-01-23 Thread Robert Sneidar
I mean Thierry I just checked this, and Malte is correct. I see now why the second example would only select lines ending in ?. I should probably remove expert in regex from my resume? ;-) Bob On Jan 23, 2013, at 3:30 AM, Thierry Douez wrote: Hi Malte, for any position of ? in

Re: Filter probelm

2012-03-14 Thread Pete
Duh!! Thank you Terry. Pete On Tue, Mar 13, 2012 at 9:35 PM, Terry Judd terry.j...@unimelb.edu.auwrote: On 14/03/2012, at 02:52 PM, Pete wrote: Unless I'm doing something wrong, filter tvar without tab doesn't work, that is the lines with a tab remain in tvar after the filter command.

Re: Filter probelm

2012-03-13 Thread Terry Judd
On 14/03/2012, at 02:52 PM, Pete wrote: Unless I'm doing something wrong, filter tvar without tab doesn't work, that is the lines with a tab remain in tvar after the filter command. Suer would be nice to have that work when dynamically building the contents of a popup menu with indented lines

  1   2   >