Q:

How do I extract overlapping character patterns with regex?

Is it possible to create a regular expression that would match overlapping character patterns?
For example, I'd like to match abc, bcd, cde and def from string abcdef.
If it is not possible, can you do the same with the two other stone age tools; sed and awk?

A:

If what you mean is to repeatly extract 3 characters, then:
In old sed:
$ sed ':1;h;s/\(...\).*/\1/p;g;s/.//;t1;d'  <<<$'abcdef\n1234567\n'
abc
bcd
cde
def
123
234
345
456
567

In old awk:
$ awk '{a=$0;for(i=1;i<length(a)-1;i++){print substr(a,i,3)}}' <<<$'abcdef\n1234567'
abc
bcd
cde
def
123
234
345
456
567

