RE: similar strings
RE: similar strings
- Subject: RE: similar strings
- From: "Grimm, Kenneth" <email@hidden>
- Date: Mon, 9 Jan 2006 11:21:08 -0500
- Thread-topic: similar strings
Title: RE: similar strings
It seems to me that the issue here is defining "similarity" in this context, then writing the code around that definition.
Would something similar to SQL's "LIKE" command do it? (Searching for a similar pattern within a string?) Use regular expressions? Custom conditionals?
There are so many ways to look at this...
Ken
----------
From: applescript-users-bounces+kgrimm=email@hidden on behalf of Barry Wainwright
Sent: Monday, January 9, 2006 9:50 AM
To: Feat; Applescript Users
Subject: Re: similar strings
On 9/1/06 11:37, "Feat" <email@hidden> wrote:
> Hi, list!
>
> I need to sort strings by their degree of similarity, ignoring case. Is there
> a quick way to tell that "xxx abc zzz" and "ppp abc qqq" share the "abc"
> segment?
Not sure what you are asking for here - do you want to sort the strings by
the 'abc' field, or ignoring the 'abc' field?
Whichever way, you can do it with a 'do shell script "sort -f ..."' command.
See the man pages for a description of how to define fields and character
positions within the sort command.
--
Barry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden