summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-10 19:35:15 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-10 19:35:18 +0200
commit985ea862bc268e02418874dfaab6c571e3b8d060 (patch)
treeb7d5625971f03b49985e93c219010953f3535acf /bin
parent2a1870db849fb92a15149fe7e012feaf6c84d2cc (diff)
grepc: Simplify escaping \
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/grepc4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/grepc b/bin/grepc
index b5ce94a..e36c96d 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -33,7 +33,7 @@ grepc_macro_simple()
grepc_helper \
"#\s*define\s+$1\b[^(]" \
'.' \
- "(?s)#\s*define\s+$1\b(?!\().*?[^\\\\]$";
+ '(?s)#\s*define\s+'"$1"'\b(?!\().*?[^\\]$';
}
@@ -42,7 +42,7 @@ grepc_macro_func()
grepc_helper \
"#\s*define\s+$1\(" \
'.' \
- "(?s)#\s*define\s+$1\(.*?[^\\\\]$";
+ '(?s)#\s*define\s+'"$1"'\(.*?[^\\]$';
}