...and the divide is effectively implemented by "multiplication", i.e. repeating the same match group (via backreference). It's one of those things that looks impossible at first, but you instantly turn to "of course that's how it works!" once you understand. That said, I still think this article is on the verbose side.
Also, strictly speaking, it's not a "regular expression" but a "regex", as backreferences make the language more powerful than regular.
AUTHOR
Larry Wall <larry@wall.org>
Maintainer: Larry Wall <larry@wall.org>
Date: 4 Jun 2002
Last Modified: 18 May 2006
Number: 5
Version: 7
This is the Apocalypse on Pattern Matching, generally having to do with what we call "regular expressions", which are only marginally related to real regular expressions. Nevertheless, the term has grown with the capabilities of our pattern matching engines, so I'm not going to try to fight linguistic necessity here. I will, however, generally call them "regexes" (or "regexen", when I'm in an Anglo-Saxon mood).
Also, strictly speaking, it's not a "regular expression" but a "regex", as backreferences make the language more powerful than regular.
https://en.wikipedia.org/wiki/Regular_expression#Patterns_fo...