@ed1conf
BTW, Re:

> Using \1, \2, etc to refer to regex captures

I had remembered that as an ex(1) enhancement. Did ed(1) indeed have regex captures, and I'm just misremembering?

This has been answered properly, but let me add, more generally, that (if I recall correctly) it was with `ed' that regexes became more than regular expressions.
Indeed backreferences may have been the first swallow.

Don't trust me, of course; I don't know the history of SNOBOL, for example.

@dougmerritt @ed1conf

Just for the record; I looked it up:

SNOBOL by Farber, Griswold and Polonsky was developed at Bell Labs (!), 1962–1967.
Its patterns are essentially as powerful as context-free grammars, but syntactically they are rather different from regexes.
Etc.

I didn't find out if there are any records of SNOBOL influencing Unix regex processing.
Obviously, that is likely, and it is also likely it has been written up.

#PatternMatching
#Regex
#Regexes
#Regexp
#Regexps
#SNOBOL

@dougmerritt @ed1conf

@vnikolov
I've looked moderately extensively at the history of early Unix (I did part of the resurrection of version 1, if I didn't mention) and Ken Thompson, and I don't recall any mention of him being influenced by Snobol.

However I also don't remember who authored the early snobol interpreter for Unix nor when it appeared. Hmm.

Anyway Thompson *is* pretty universally credited for popularizing regular expressions after Kleene invented them, from ed and its spinoffs.

Snobol itself I've looked up a number of times, but I never fully grasped its syntax. I always meant to get back to that.

I did extensively study Griswold's book on his much later successor language, Icon.

@ed1conf

@vnikolov
Of interest: "Regex engines: History and Contributions"
https://compileralchemy.substack.com/p/regex-engines-history-and-contributions

Snobol is barely mentioned in passing.

@ed1conf

Regex Engines: History and Contributions

A delightful read on regex, language, reasoning and maths

Luminotes