Thanks Mark - that fixed it (as in, the simpler approach of dropping the brackets).
Being ‘regex-phobic', I hadn’t picked up the subtle difference between wildcards and ‘formal’ regex in the doc examples. ;-) Thanks & regards, Keith > On 13 Aug 2018, at 16:38, Mark Wieder via use-livecode > <[email protected]> wrote: > > On 08/13/2018 08:32 AM, Keith Clarke via use-livecode wrote: >> Folks, >> I’m trying to filter a list of comma-delimited values to include only the >> lines that contain a string - somewhere in any of the items. >> What’s wrong with this syntax - it’s currently returning no lines when I can >> see tString in the second line of the variable? >> filter lines of tList with "*[" & tString & "]*" >> I’m guessing my concatenation fails to create good regex? > > If you really want regex then you have to specify that explictly: > > filter lines of tList with regex pattern "*[" & tString & "]*" > > but my guess is what you want is just > > filter lines of tList with "*" & tString & "*" > > -- > Mark Wieder > [email protected] > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
