1

I have a few very long and large documents in MS Word, containing iMessaging history. I want to reorder the current format a bit, so it is more intuitive to read. Currently a sample of one document is:

Date: 04-26-2014 20:21 (iMessage)
Hello
Amelia (above):

Date: 04-27-2014 23:52 (iMessage)
Hi?
Ethan (above):

Date: 04-28-2014 08:05 (iMessage)
Hey. how've you been?
Amelia (above):

Date: 04-29-2014 00:39 (iMessage)
Tired and busy.. (Sample big, long paragraph spanning many lines, blahblahblahblahblahblah blahblahblahblah)... you?
Ethan (above):

I'd like to reorder it so it looks more like:

Date: 04-26-2014 20:21 (iMessage)
Amelia (Below):
Hello

Date: 04-27-2014 23:52 (iMessage)
Ethan (Below):
Hi?

Or perhaps even:

Amelia: 04-28-2014
Hey. how've you been?

Ethan: 04-29-2014
Tired and busy.. (Sample big, long paragraph spanning many lines, blahblahblahblahblahblah blahblahblahblah)... you?

As you can see, my primary concern is moving the indication on who is talking from the BOTTOM of the text message, to ABOVE the text message, however long the text message may be... And then a secondary thing would be to get rid of the unnecessary information to leave only the name and date.

The problem is, I have no easy way to move however many hundreds of instances of those two names, to above whatever variable text message it may have. I know the advanced find and replace feature of MS Word is very powerful, but I don't know enough about the syntax to be able to formulate my own working solution.

What I know:

  • You can easily use MS Word's ability to find and replace, to get rid of all the instances of "(above)" and replace them with air.
  • You can select similar strings of text, even if they vary, using wildcards... For example, this "search for" selects all instances of "Date: [varying numbers] (iMessage)" Date: (*{1,})\)
  • You can use some code like-- Search: (<*>)[space](<*>) Replace: \2[space]\1 In order to reorder different blocks of text.

I just need help with putting this information together into a solution that will be able to recognize the different sections of text-- The date, the message, and the author-- And will be able to reorder them how I want. Any help would be appreciated!

I'm also open to using other free programs, instead of necessarily MS Word... But since I'm on mac, there is the compatibility issue with things like Notepad++, etc, so I'd rather stick to MS Word if possible.

1
0

Assuming the three parts are separate paragraphs I was able to get the following to work with your sample text (2 steps):

Find and replace #1 (wildcard) Find: (Date:*iMessage\)^13)(*)(^13[A-Z][a-z ]@\(above\):) Replace: \1\3^p\2

Then to tidy up extra blank lines, one more quick find and replace (NOT wildcard):

Find and replace #2 (replace double paragraphs with single): Find: ^p^p Replace: ^p

1
  • Thanks so much, this solved my problem! :D I did have to edit the search field slightly because when I copy-pasted from Word, to this website, the formatting was changed a bit-- But all I had to do is remove the ^13 characters, and it successfully reorders it all, now! Thanks again, --Ethan. – Ethan Tison Jun 22 '16 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.