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

Filter with wildcards

2023-10-30 Thread David Glasgow via use-livecode
Hi folks, I am doing the above and struggling with an oddity that I can’t find guidance on on Livecode or wider wildcard stuff A simple example is I am searching text messages for 'with you' or 'with u’ so I use the wildcard form *with [you,u]* That finds all examples of both just fine.

Re: Escaping the Filter command's wildcards

2013-05-25 Thread Jeanne A. E. DeVoto
At 6:30 PM -0700 5/22/2013, Peter Haworth wrote: I do find it strange that filter doesn't support full regexp syntax, seems like RunRev would have had to write special code instead of using standard regexp libraries which they use in other commands It was never supposed to be a regex command

Re: Escaping the Filter command's wildcards

2013-05-25 Thread Peter Haworth
Well it sounds like it will support full rgexp in the near future courtesy of Jan Schenkel and OSS. Pete lcSQL Software http://www.lcsql.com On Sat, May 25, 2013 at 4:46 PM, Jeanne A. E. DeVoto revolut...@jaedworks.com wrote: At 6:30 PM -0700 5/22/2013, Peter Haworth wrote: I do find it

Re: Escaping the Filter command's wildcards

2013-05-23 Thread Jan Schenkel
at the same time. (La Rochefoucauld) - Original Message - From: Peter Haworth p...@lcsql.com To: How to use LiveCode use-livecode@lists.runrev.com Cc: Sent: Thursday, May 23, 2013 3:30 AM Subject: Re: Escaping the Filter command's wildcards I do find it strange that filter doesn't support

Re: Escaping the Filter command's wildcards

2013-05-23 Thread Jan Schenkel
For those interested, I started the discussion on the engine contributors forum: http://forums.runrev.com/viewtopic.php?f=66t=15250 Cheers, Jan Schenkel.   = Quartam Reports PDF Library for LiveCode www.quartam.com = As we grow older, we grow both wiser and more foolish at the same

Re: Escaping the Filter command's wildcards

2013-05-23 Thread Peter Haworth
Thanks Jan. Pete lcSQL Software http://www.lcsql.com On Thu, May 23, 2013 at 10:10 AM, Jan Schenkel janschen...@yahoo.comwrote: For those interested, I started the discussion on the engine contributors forum: http://forums.runrev.com/viewtopic.php?f=66t=15250 Cheers, Jan Schenkel.

Escaping the Filter command's wildcards

2013-05-22 Thread Paul Dupuis
The filter command in LiveCode appears to accept a regular expression (using ? for a single character match, * for multiple character match, [chars] and [char-char]). However, if you want to filter a container to a string where you pattern contains a question mark, it does not appear that you can

Re: Escaping the Filter command's wildcards

2013-05-22 Thread Mark Schonewille
Hi Paul, This works fine for me: put replacetext(xxx?!xxx,[\?!],) -- xx What exactly is the problem you're having? Could you post some of the code that doesn't work for you? -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage:

Re: Escaping the Filter command's wildcards

2013-05-22 Thread Mark Schonewille
Paul, I read your message three more times, and I think I should note that put replacetext(xxx?!xxx,\?,) works too: -- xxx!xxx in addition to put replacetext(xxx?!xxx,[\?!],) -- xx -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage:

Re: Escaping the Filter command's wildcards

2013-05-22 Thread Peter Haworth
I think there's been discussions on the list before about the filter command and the fact that it doesn't seem to support the full regexp syntax, only the specific functionality described in the dictionary Pete lcSQL Software http://www.lcsql.com On Wed, May 22, 2013 at 2:16 PM, Paul Dupuis

Re: Escaping the Filter command's wildcards

2013-05-22 Thread Paul Dupuis
On 5/22/2013 5:37 PM, Mark Schonewille wrote: Hi Paul, This works fine for me: put replacetext(xxx?!xxx,[\?!],) -- xx What exactly is the problem you're having? Could you post some of the code that doesn't work for you? it is with the filter command not the replaceText function I

Re: Escaping the Filter command's wildcards

2013-05-22 Thread Mark Schonewille
Hi Paul, I see what you mean. You weren't looking for a solution, just for more trouble :-) I tried several special characters and they can all be used to filter lines with the same workaround. Unfortunately, many of those special characters have no effect, because regex isn't fully

Re: Escaping the Filter command's wildcards

2013-05-22 Thread Paul Dupuis
On 5/22/2013 8:32 PM, Mark Schonewille wrote: Hi Paul, I see what you mean. You weren't looking for a solution, just for more trouble :-) I tried several special characters and they can all be used to filter lines with the same workaround. Unfortunately, many of those special characters

Re: Escaping the Filter command's wildcards

2013-05-22 Thread Peter Haworth
I do find it strange that filter doesn't support full regexp syntax, seems like RunRev would have had to write special code instead of using standard regexp libraries which they use in other commands Shouldn't be too difficult to write a myFilter function that supports full regexp syntax using a