Searching for a word when it's more than one word

Richmond Mathewson richmondmathewson at gmail.com
Sat Sep 1 07:46:00 EDT 2018



On 1/9/2018 2:25 pm, Mark Waddingham via use-livecode wrote:
> On 2018-09-01 13:15, Richmond Mathewson via use-livecode wrote:
>> I've already shovelled Ruyton of the Eleven Towns quite effectively:
>>
>> https://www.dropbox.com/s/n7r7u0c2m9ny3eb/Text%20analyzer%20X.livecode.zip?dl=0 
>>
>>
>> No tokenising, in fact very basic stuff indeed.
>>
>> Not wishing to bang on about over-complcating things . . . . .
>
> Your revised approach is fine - as long as the names of all the towns 
> are distinct in terms of no one town's name is contained within another.

Blast!

Of course "my next trick" is to work out how to delete multi-word names 
(i.e. phrases) from a textField.

Richmond.
>
> Add 'Palm Beach West' and 'Palm Beach' to your placeNames list; then 
> modify your source text to end 'or Palm Beach West' - and you 
> algorithm does not perform the requested operation.
>
> It reports Palm Beach West *and* Palm Beach as being present - 
> whereas, only 'Palm Beach West' is present :D
>
> Warmest Regards,
>
> Mark.
>





More information about the use-livecode mailing list