test results, Solaris, lightly edited for appearance
    (similar behavior on Linux and Mac OS X with GCC)

% cc -v regex-1.c

% cat in
defabcwxyzabc

% a.out < in
usage: a.out pattern
   reads from stdin, reports matches

% a.out abc < in
match: "abc"
defabcwxyzabc
01234567890123456789

start of first example
yes
end of first example

start of second example
1 error = 0, pm = 3, 6
2 error = 0, pm = 4, 7
2 error = 0, pm = 3, 6
2 error = 0, pm = 4, 7
...
^C

%