filter command limitation?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10428
Joined: Wed May 06, 2009 2:28 pm

filter command limitation?

Post by dunbarx » Tue Dec 02, 2025 10:35 pm

The "Filter" command is compact and powerful. But it is limited in the sense that it only works with "whole" lines, items, keys, etc. In other words, I wish that, given in a field 1:
aa,bb,cc
dd,ee,ff
gg,hh,jj
it would filter out line 2 from the following:

Code: Select all

on mouseUp
   get fld 1
   filter lines of it without "ee"
end mouseUp 
But it does not, since it only sees "whole" lines. Am i missing something here? Is there a way to lose line 2 because it contains a string, as opposed to the line being the string?

Craig

SparkOut
Posts: 2973
Joined: Sun Sep 23, 2007 4:58 pm

Re: filter command limitation?

Post by SparkOut » Tue Dec 02, 2025 10:41 pm

Hi Craig,
You can use * as a wildcard before/after the filter part. With some possible fudging for beginning/ends of the line and checking for CR as well.

Post Reply