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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user