grep: option to use GNU regex matching instead of POSIX one.

This fixes problems with NULs in files being scanned, but
 costs +800 bytes. The same can be done to sed (TODO).
This commit is contained in:
Denis Vlasenko
2008-08-09 16:15:14 +00:00
parent fb5902ca5c
commit 3fd15e197e
5 changed files with 155 additions and 36 deletions

View File

@@ -27,6 +27,6 @@ void FAST_FUNC xregcomp(regex_t *preg, const char *regex, int cflags)
{
char *errmsg = regcomp_or_errmsg(preg, regex, cflags);
if (errmsg) {
bb_error_msg_and_die("xregcomp: %s", errmsg);
bb_error_msg_and_die("bad regex '%s': %s", regex, errmsg);
}
}