3 ms·
Perl's use of this syntax had ancestors in awk, sed, ed, and qed - originally just for string replacements in qed until Ken Thompson wrote a version that did re
by bazzargh 10y ago
Perl's use of this syntax had ancestors in awk, sed, ed, and qed - originally just for string replacements in qed until Ken Thompson wrote a version that did regexps too. It dates back to 1967. https://www.bell-labs.com/usr/dmr/www/qed.html https://www.bell-labs.com/usr/dmr/www/qed.html
Deutsch&Lampson's original paper on qed showing s/// used for string substitution prior to it gaining regexps is here:
http://research.microsoft.com/en-us/um/people/blampson/04-OnlineEditor/04-OnlineEditor.htm http://research.microsoft.com/en-us/um/people/blampson/04-On...
Incidentally the name 'grep' originated here, 'G/RE/P' was a qed command to do a Global Regular Expression match and Print the matches.