Get MIDI event with Regex

Hi there,

I'm trying to make a macro that will read whatever key I press on my MIDI keyboard and paste the note number in Excel or Numbers. There is no action like "get MIDI event," but there is a MIDI trigger for "This MIDI: packet". The manual says that I can use RegEx to narrow down what kind of event I want. Thing is, I've tried matching the inputted notes to any character or any string of characters (like * or ......) but it won't recognize any of my RegExes, only specific MIDI packets.

How do I actually use RegEx like the manual says in order to get any MIDI note from my keyboard?

Thanks!

What were the regex patterns that you tried and couldn't get to work ? "*" isn't a valid regular expression by itself, and "......" will match any 6 characters.

Is your issue a problem with the nature of regular expressions themselves, or that your patterns—for some other reason—are failing to do what you believe they should be doing ?

I figured it out. I needed the parentheses: (.*)

You needed the period. As I said, "*" isn’t a valid regular expression by itself, but ".*" is—it matches any character, any number of times.

Well done for getting it to work.