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 Glasgow via use-livecode 
>  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


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 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


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 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 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


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 with"[az]*"-- tVar contains all property names beginning with 
a or z


and the problematic phrase is 'beginning with'.

On 30.10.23 19:17, David Glasgow via use-livecode 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


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 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


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.  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