Well, you have to first define and tell us how each "word" is separated.
The example you gave of "New York, NY" clearly contains multiple "words" as commonly defined, and as defined by normal RegEx rules.
Once we know the delimited between fields (what you are calling words) it is fairly easy.
If you get this by a copy from cells in the same row in Excel, then the fields will be separated by TABs.
Here is a simple solution using TABs. It is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.
Please let us know if it meets your needs.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MACRO: Extract Fields from Copy of Excel Data [Example]
-~~~ VER: 1.0 2021-02-27 ~~~
Requires: KM 8.2.4+ macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))
DOWNLOAD Macro File:
Extract Fields from Copy of Excel Data [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.
ReleaseNotes
Author.@JMichaelTX
PURPOSE:
- Extract Fields from Copy of Excel Data [Example]
HOW TO USE
- First, make sure you have followed instructions in the Macro Setup below.
- Select the Cells in Excel You want to Process
- Trigger this macro.
MACRO SETUP
.
Make These Changes to this Macro
- Assign a Trigger to this macro.
- Move this macro to a Macro Group that is only Active when you need this Macro.
- ENABLE this Macro, and the Macro Group it is in.
.
- REVIEW/CHANGE THE FOLLOWING MACRO ACTIONS:
(all shown in the magenta color)- RegEx Search: Extract Tab-Delimited Data
- Change the KM Variable Names as you like
- RegEx Search: Extract Tab-Delimited Data
REQUIRES:
- KM 9.0+ (may work in KM 8.2+ in some cases)
- macOS 10.11.6 (El Capitan)+
TAGS: @Search @RegEx @Extract @Example