View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default How to truncate list of meaningful words greater than 15 chars to meaningful words of 8 chars.

On Fri, 29 Apr 2011 07:55:43 -0700, Gord Dibben wrote:

Ron

This is shaping up to be interesting<g


Gord


Yes, it is, Gord.

I don't really know what is meant by "meaningful". On aviation charts, there are a number of "intersections" in the airspace which have pronounceable names but, except for a few sequences, it would be hard to classify these names as being "meaningful". And, for reading purposes, vowels are often superfluous, the additional limitation of eight characters makes it real tough.

I am guessing it might result in a more meaningful string to remove the vowels and spaces, and then truncate at eight characters; although, depending on the set, we might well wind up with some duplicates. We'll see what the OP wants to do.

This regex: "(\w)(?=[aeiou\s]*\1)|[aeiou\s]" will match every letter that is:
followed by itself (duplicated)
followed by a series of vowels and spaces and then by itself
or IS a vowel or space.

So when used in a regex replace function, it will remove those kinds of sequences and perhaps generate something meaningful. The problem is how to reduce the result to just eight characters, and still retain the "meaningfulness".