How to Learn Regular Expressions (RegEx)

Dear Chris,

Thank you for your polite explanation.

I will read the instruction site about RegEX.
If you really don't recommend Friedl's book do you have any recommended books?

From the age of over 70th, it is much easier for the eyes to see it slowly in the book than to see the characters on the display screen.

Recommended purchased at the end of last year.

I am currently using it for writing various sentences so that it can be used.

Moreover, I was able to prepare the environment for using LaTex gradually with BBEdit, because I love using LaTeX anyway.

Thx and regards,
WAKAMATSU (boehmflute)

Hey @boehmflute,

These plus Freidl's are listed in the books section of the KM Wiki's RegEx reference page.

I have all of them, plus several tomes on Perl.

I'm Interested in these two, but I haven't had my hands on them yet.

Note -- “Mastering Regular Expressions” by Jeffry Friedl has its merits but is very technical and not really for beginners.

Reading about regular expressions helps develop vocabulary, but it is only through repeatedly working with them that one develops proficiency.


Dear Chris,
Thank you for presenting a bibliography list.
I looked up the literature on WiKi and looked it up, but I immediately searched for books that you introduced for me this time.
I got the following books, so I'd like to read it.
Beginning Regular Expressions by Watt
Regular Expressions Cookbook by Goyvaerts & Levithan
Regular Expression Pocket Reference by Tony Stubblebine
Introducing Regular Expressions by Michael Fitzgerald
Thx and regards, WAKAMATSU (boehmflute)

Dear Chris,
"Mastering Regular Expressions" by Jeffry Friedl is the only literature that can be read in Japanese.
This is simply a reason why I began to read.
However, there are many difficult to understand in Japanese translation, so I can not grasp exactly, so I am reading the original English while looking it up in a dictionary.
Regards, WAKAMATSU (boehmflute)

There is a lot of discussion on learning RegEx here:

I found this tutorial site to be very useful... I was starting at absolute beginning and it got me going ... and is a useful reference since.


If you have, the 8th chapter of the user manual is an excellent resource.

It is a PDF, so you can print the relevant pages rather than reading on a display.

Good luck in your regex adventures!

There's a nice introduction to RegEx from 2020 MacAdmins at

And if you like your learning gamified, have a look at -- basic tutorial and then a series of "crosswords" of different levels of difficulty.

And if you want a handy reminder of all the regex options, the Keyboard Maestro macro Glossarium includes a regex glossary.

Learning is one thing but remembering is the trick.

I have this (local file) bound to a keyboard shortcut in BBEdit, so I have a reference that's searchable with BBEdit while I'm using it.