[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[StrongED] searching for last word in a field



Can I use advanced search&replace to select just the last word in a field?

I am trying to process a friend's list of postal addresses, and have so 
far got it to look like this:

     Alex Ferguson[tab]1 New Street\nAnytown[tab]AB1 2XY

     John James Somebody[tab]14 Old Road\nSomewhere[tab]SO9 9PQ

     Mr & Mrs John & Jane Jones[tab]Big House\nSmall 
     Road\nTinyville[tab]PQ34 9YZ

What I want to do is copy the surname in each record to a new column that 
I can then use to sort abfaletically:

     Ferguson[tab]Alex Ferguson[tab]1 New Street\nAnytown[tab]AB1 2XY

     Somebody[tab]John James Somebody[tab]14 Old 
     Road\nSomewhere[tab]SO9 9PQ

     Jones[tab]Mr & Mrs John & Jane Jones[tab]Big House\nSmall 
     Road\nTinyville[tab]PQ34 9YZ

Alternatively, maybe there's a way of sorting the file as it stands, 
instead of my idea of making a new column for the purpose of sorting.  
(Gavin Wraith wrote me a Lua routine a couple of years ago to sort by 
surname. It works well for a simple list of just names, sans the tabs and 
addresses that are in my example above.)

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at
http://stronged.torrens.org/index.html