Altered for inclusion in the 4.4BSD distribution. This is an alpha release with known defects. Please report problems. There is one known functionality bug. The back-reference code is subtle and doubts linger about its correctness in complex cases.
Regexec performance is poor.
This will improve with later releases. Regexec is largely insensitive to RE complexity except that back references are massively expensive. Regcomp implements bounded repetitions by macro expansion, which is costly in time and space if counts are large or bounded repetitions are nested. There are suspected problems with response to obscure error conditions. Notably, certain kinds of internal overflow, produced only by truly enormous REs or by multiply nested bounded repetitions, are probably not handled well.