Pat Brown wrote:
> I received a document which, essentially is a document of song lyrics.
> However, they were typed in at random, as they were received. I now want to
> sort the songs by song title and can't figure a way to do this. The format
> is the following:
> The song title, the artist, the lyrics. Each line is essentially a new
> paragraph so I cannot sort by paragraph. I need some way of marking the
> beginning and the ending of each song, having the contents between these
> two marks recognised as a unit, and then sorting these units. Does anyone
> have any ideas, without having to select each song, cutting it and then
> pasting it in its correct position alphabetically
>
Here is a recipe that could help you, but it requires the Alternative Searching
extension (aka Alternative Find & Replace)
1. Choose two characters that do not appear in your text. I chose # an §.
2. Mark every song title, except the first one, with # at the beginning of the
line.
3. With Alt. Find & replace:
Search For: \p
Replace: §
Check "regular expressions" box
Replace all
4. With Alt. Find & Replace:
Search for: §#
Replace \p
("regular expressions" box still checked)
5. Select all text and then Tools > Sort.
6. With Alt. Find & Replace:
Search for: §
Replace \p
("regular expressions" box still checked)
As far as I know, steps 4 and 6 cannot be done with the regular find and
replace as you can't specify a paragraph mark in the replace. At least i don't
know how to.
--
Piet van Oostrum <[email protected]>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
--
To unsubscribe e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted