Jonathan Kaye ha scritto: > Hi all, > Thanks to the excellent advice I've received I now have (I believe) a > working and bug free macro. One difficult (for me) piece of it was a macro > called "cutspace" which scans a string until it finds either a fullstop or > a space (let's call it a chunk) and gathers all the tones (indicated by > 1234 in the string) and puts them at the end of the chunk. It works its way > through the string moving the tones (if they are present) to the correct > location. This function is only a small part of a much larger one which > encodes strings in such a was as they are sorted correctly. The encoding > are generated in a different column from the originals and the sort is > based on that column (invisible to the reader, of course). > Here's the code. If there are any OO Basic features I've missed that would > simplified things, I'd be grateful to hear about them.
Not sure, but perhaps it could be useful: http://codesnippets.services.openoffice.org/Office/Office.SimpleNaturalSortAlgorithm.snip Here you can find some basic code that performs various string crunching (move, search&replace, sort) using Regular Expressions from the OpenOffice.org. API ciao Paolo M --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
