filter

Klaus major-k klaus at major-k.de
Thu Nov 19 10:50:51 EST 2020


Hi Mark,

> Am 19.11.2020 um 16:38 schrieb Mark Waddingham via use-livecode <use-livecode at lists.runrev.com>:
> 
>> 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 operators in the wildcard pattern (i.e. *, [ and ?).

ah, get it! So I added this accordingly:
...
filter fld 1 with "[[]*[]]"
...
to be on the safe side and it works like a charme!

> Hope this helps,

Yes, it does, thank you very much!

> Mark.
> 
> P.S. Wildcard patterns are a lot simpler than general regexes, but 'filter' can do both "filter ... with regex pattern ..." interprets the pattern the same as matchText/replaceText.
> 
> -- 
> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps

Best

Klaus

--
Klaus Major
https://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list