Problems with Filter?

Mark Wieder ahsoftware at sonic.net
Sat Mar 12 17:40:07 EST 2022


On 3/12/22 14:21, Rick Harrison via use-livecode wrote:

> So what did it filter?  It’s the same string I started with.

Exactly. You want matchtext, not filter.

There is a way to finesse this if you really need to use filter:

    local tSubString, tTarget, tLargeTextString
    local tResult

    put "*THIS*FIND*" into tTarget
    put "abcdef&cr&ghijkTHISISMYTEXTTOFINDlmnopq&cr&rstuvwxyz" into 
tLargeTextString

    filter tLargeTextString with tTarget
    set the itemDelimiter to "THIS"
    put item 2 of tLargeTextString into tSubString
    set the itemDelimiter to "FIND"
    put item 1 of tSubString into tResult

-- 
  Mark Wieder
  ahsoftware at gmail.com



More information about the use-livecode mailing list