The first stage is to define clearly, to yourself, exactly what you want.
The second stage is to translate that definition into things that Keyboard Maestro makes available.
For example:
-
"Billy Jones" -> "Jones"
. You just want the last word of any name ? What about about double-barreled or hyphenated names ? -
S0000001 - Location
. You specifically want to discard the wordLocation
? Or just anything after (and including) a final hyphen ? Will there always be a final hyphen ?
Once you've fully explained it to yourself, in relation to all the possible cases that you expect to arise, then you will find it much easier to explain to Keyboard Maestro, in terms of, for example: