Problems with Filter?
Brian Milby
brian at milby7.com
Sat Mar 12 17:28:10 EST 2022
Your source was only one line. The default for filter is to work by line. It returns all lines that match, hence the same string you started with.
Sent from my iPhone
> On Mar 12, 2022, at 5:22 PM, Rick Harrison via use-livecode <use-livecode at lists.runrev.com> wrote:
>
>
> put "THIS*FIND" into tTarget
>
> put “abcdefghijkTHISISMYTEXTTOFINDlmnopqrstuvwxyz” into tLargeTextString
>
> put tLargeTextString into pText
>
>
> — Adding your code here Mark:
> put ".*THIS.*FIND.*" into tTarget
>
> filter pText with regex pattern tTarget into tFilteredTextResult
>
> answer "tFilteredTextResult = " & tFilteredTextResult
>
> yields:
>
> tFilteredTextResult = "abcdefghijkTHISISMYTEXTTOFINDlmnopqrstuvwxyz”
>
> So what did it filter? It’s the same string I started with.
>
> Rick
>
>> On Mar 12, 2022, at 3:43 PM, Mark Wieder via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> or
>> put ".*THIS.*FIND.*" into tTarget
>> filter pText with regex pattern tTarget into tFilteredTextResult
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list