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 string containing no regular expressions)

Because I am lazy, and a simple soul, I will probably just  split the task into 
two filter commands - which will deliver exactly what I want at only a minimal 
time and thought overhead.

Cheers

David G

> On 30 Oct 2023, at 7:29 pm, Mark Waddingham via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> 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 Glasgow via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> 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.  However, it also finds ‘with 
>> unlimited cheese’ and 'with us’, ‘with yours’ etc.  so I want a space after 
>> both u
>> 
>> When I put two spaces inside the square brackets after each string, the 
>> search still works but spaces seem to be ignored (so still finds the above 
>> resamples I don’t want).
>> 
>> If I put a single space after the brackets the first bracketed string is 
>> ignored and the filter only finds “with u “
>> 
>> Hope someone can help me stop pulling my baffled face
>> 
>> Cheers
>> 
>> David Glasgow
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Reply via email to