aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/grab.c b/src/grab.c
index 15eb3eb..7571b19 100644
--- a/src/grab.c
+++ b/src/grab.c
@@ -12,7 +12,9 @@
# include <pcre2posix.h>
#else
# include <regex.h>
-
+# ifdef REG_DOTALL
+# define REG_DOTALL 0
+# endif
# define REG_UCP 0
# define REG_UTF 0
# ifndef REG_STARTEND
@@ -463,9 +465,7 @@ mkregex(char *s, size_t n)
regex_t r;
s[n] = 0;
- cflags = REG_EXTENDED | REG_UTF;
- if (nflag)
- cflags |= REG_NEWLINE;
+ cflags = REG_EXTENDED | REG_UTF | (nflag ? REG_NEWLINE : REG_DOTALL);
if (!Uflag)
cflags |= REG_UCP;
if ((ret = regcomp(&r, s, cflags)) != 0) {