Reformatting in KM

Hey there,

I'm looking to take the following text:

3m04 - Buy Her The Dog [0:35]

And reformat it so it comes up as:


So far I've copied the text and using Search Using Regular Expression, I can't seem to figure out how to capture just the "3m04" and "Buy Her The Dog" so I can reformat the" - " to just "_". I'm a beginner still with Regular expressions and KM but is it possible to do the above? Thanks!

Here's an example that should do the trick.
Please let us know if this works for you.


Example Output


MACRO:   Extract Fields from String and Recombine [Example]

~~~ VER: 1.0    2019-09-20 ~~~
Requires: KM 9.0.2+   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 String and Recombine [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.

Release Notes

  1. This makes use of the new Text Case Conversions provided in KM 9.0.
  2. It uses this RegEx:

1 Like