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@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@lists.runrev.com> wrote:
>> 
>> or
>>   put ".*THIS.*FIND.*" into tTarget
>>   filter pText with regex pattern tTarget into tFilteredTextResult
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to