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
> 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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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.
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
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:
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:
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
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
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
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
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
27 matches
Mail list logo