Regex works one way but not the other

Regex works one way but not the other and I have no idea why.

The only difference between these two macros is how the variable SongReleaseDate is set. The first macro it is set via an "execute script" action and the second macro it is set by a "set variable" action. I have verified visually that the execute script is in fact setting the variable.

Help would be greatly appreciated.

Larry Wilson

ZZ for testing Macros.kmmacros (4.4 KB)

Keyboard Maestro Export

The one that doesn't work (the one that uses AppleScript) returns the date in this form:

date Friday, 15 July 2022 at 13:00:00

on my system, whereas the one that does work (via set variable) uses a date of this form:

date Friday October 13, 1960 at 01:02:03 AM

As you can see, the regex you're using won't work in the first case.

1 Like

those pesky commas!

thanks for helping a blind man...

1 Like