How Do I Copy 6 Fields of Text From an Email & Paste Into My Notes App?

Hey Mike,

Good goal, but It'll take you too long this time around.

Here's an example of what it takes to accomplish your task:

Scraping Email Data with RegEx.kmmacros (7.5 KB)
Keyboard Maestro Export

Learning regular expression well is a time consuming process. You have to have a goal and then study, practice, get frustrated, ask questions, and practice some more.

Learning the basics doesn't take all that long though, and once you start getting them to do what you want they can be fun.

Download BBEdit if you don't have it already. You don't need to buy it. It will revert to a freeware (Lite) version after a demo period, and the lite version has good regex support. (The commercial version has a regex playground which is pretty nice, but you can get a lot of that for free from https://regex101.com).

BBEdit is a good testing ground for regular expressions – although keep in mind that it uses PCRE regex while Keyboard Maestro uses ICU regex.

The good folks at Bare Bones Software have been building BBEdit since 1992, and it's nice to support them by buying the product if it is useful to you – but no pressure.

BBEdit's user manual on regular expressions is decent.

Keyboard Maestro Wiki on RegEx

Look through this topic on the forum:

How Did You Learn RegEx (Regular Expressions)?

This might be worth your time:

The site he's using in the vid:

https://regexr.com

-Chris

1 Like