Sorting using the last word of a paragraph

  • Thread starter Thread starter PT
  • Start date Start date
P

PT

I already searched for this topic and found many results. but nothing
matches my problem. below is example of my text. They are differents
news.

------------------------------------------------------------------------------

OMAG-BETRIEBSKOMMISSION MIT SOZIALPLAN NICHT EINVERSTANDEN.
Die Betriebskommission der Firma Omag in Mels SG ist mit dem von der
Konzernleitung ............
(SDA)

WIRTE FORDERN SCHLECHTWETTERGELD.
Was den Bauarbeitern recht ist, solle nach Ansicht der Schweizer Wirte
auch ihnen billig sein: Schlechtwettergeld. ...............
(Reuter)

WENIGER HOTELÜBERNACHTUNGEN IM OKTOBER.
Die im August und September nach sieben schlechteren Monaten
beobachtete Frequenzzunahme in der Schweizer ...........
(SDA)


generally:-

News heading
Text
(Agentsname)

-----------------------------------------------------------------------------

And I would like to first sort using the 'Agentsname' (SDA, Reuter,
etc), then the news heading. how could i accomplish this?

Thanks
 
Hi,
it all depens on whether the structure of your
document is absolutly (!) consistent. The samples
you gave look like:
News heading¶
Text asdasd asd asd asd asd asd asd asd asd sd asd asd asd
asd asd as das das ¶
(Agentsname)¶

By the way, I'd put the data into a simple database,
even an Excel-Sheet would be sufficient. Depending on
the amount of data, maybe even a word table would do.
 
My suggestion would be to transfer it into a table, and then sort on the
third column, then take the table away again..

Replace ......<rt> with a tab
Replace .<rt> with a tab

Select the document and change it to a table (with tabs as the delimeter),
then sort on the third colum (agents name), then change the table back into
text again, and replace tabs with returns.

I think that should work for you.

Pete.
 
Hi,
one might as well use the paragraph marks,
that are already there, as delimiter.
 
Yes, that would work if the document was entirely consistant in its use of
returns. In the real world of course, people tend to be lax in the way they
use returns, so you could have multiple returns padding to the end of page,
or people just hitting return twice, etc.

If that happens, then using returns as delimeters would cause the columns in
the table to be misaligned.

Making the delimiters where you /know/ they're going to be will produce more
stable results IMHO.

Pete.
 
Hi Pete,
I enjoy reading your postings. :-)
it all depens on whether the structure of your
document is absolutly (!) consistent.
If so, using paragraph marks as delimiter would do the job.
If not, would replacing them by tabs improve the situation?
 
Ach, you're completely right, Helmut...

This'll teach me to just jump in and reply to the last message without
reading the whole thread again, won't it?

This is one of the pitfalls of jumping into the newsgroups while you're at
work!!

It's always interesting to see other peoples views on these issues and how
they're approached (even if people doend up tripping over each other's feet
trying to help out from time to time).

Note to self: Read threads properly...

Pete.
 
Back
Top