How to truncate list of meaningful words greater than 15 chars tomeaningful words of 8 chars.

  • Thread starter Thread starter Babloo
  • Start date Start date
B

Babloo

Hi,
I am in a fix to downsize the names in a list for example.
GRONG GRONG
BORAMBOLA
MT MUNDOONEN
MOORLAND FSROL
HALFWAY CREEK
TIMBILLICA HILL
TELEGRAPH POINT
CULLENDULLA
BENDERNEER
GRASSTREE
MORUYA NORTH
LOMOND HILL
GENOA NORTH
LATROBE VALLEY
FERNY HILLS
POWRANNA
TOORLOO ARM
NEWMERELLA
CABBAGE TREE CREEK
SPROLE CASTLE
HINCHINBROOK NATIONAL PARK
EL ARISH
WAUGHS POCKET
TURTLE CREEK BEACH
WANGETTI FSRER
OAK BEACH
CUNNINGHAMS GAP WEST
CUNNINGHAM GAP EAST
PORT VINCENT CELLer
EDITHBURGH caouth
YORKETOWN CELL
ASHVILLE Fever
MARGARET RIVER
How can some one truncate them into 8 char words with meaning ful one
word
 
I'm waiting for OP's response.


Gord

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".
 
Back
Top