I'm using a simple regular expression in Keyboard Maestro's search action.
Look in the Keyboard Maestro Editor Help menu for the “ICU Regular Expression Reference” menu item.
The regular expression in the macro is searching for: (\d+)\.html$
(\d+) ⇢ search for 1 or more digits and use the parentheses to capture them for reuse.
\. ⇢ . is a special token meaning any character - the backslash escapes it, so we have a literal dot/period.
html ⇢ literal characters
$ ⇢ end of line token.
There are many websites and books devoted to regular expressions, and it's easy to get lost in them and waste time – so start out with stuff we've recommended until you know your way around.
See these links:
How did you learn RegEx (regular expressions).
Keyboard Maestro Wiki on Regular Expressions – be sure to note all the resources listed at the bottom.
You can also search the forum for “regex” and “regular expression” to find many examples.
If you don't have it download BBEdit. The demo version is fully functional for 30 days and then reverts the the “lite” mode, unless purchased and activated with a license.
Whether you buy it or just use the lite version BBEdit is a must for all people working with text on a Mac. It has excellent regular expression support and is one of the most AppleScriptable applications available on the Mac.
I've used it since 1993 or so and am evangelizing it here, because it's a good app for working with regular expressions.
-Chris