Macro to swap words in a comma-separated list

M

Malcolm Patterson

Given a sentence like the following:

Someone is watching every Tom, Harry, and Dick as they pass the storefront.

How can I use a wildcard search to find

Harry, and Dick

and replace it with

Dick, and Harry

This happens often enough that I want to record a macro.
 
P

Paul B

Given a sentence like the following:

Someone is watching every Tom, Harry, and Dick as they pass the storefront.

How can I use a wildcard search to find

Harry, and Dick

and replace it with

Dick, and Harry

This happens often enough that I want to record a macro.


Find: (Harry)(, and )(Dick)

Replace: \3\2\1

p.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top