Skip to main content
15 events
when toggle format what by license comment
Feb 10, 2023 at 13:52 answer added White Owl timeline score: -1
Feb 10, 2023 at 12:12 history edited Stéphane Chazelas
edited tags
Feb 10, 2023 at 12:11 comment added Dhruv @StéphaneChazelas printf 'a\nb' | grep -zEo 'a\Wb' doesn't work and neither does printf 'a\nb' | grep -zEo 'a.b'. I am using Mac.
Feb 10, 2023 at 12:05 comment added Stéphane Chazelas FWIW with 2.5.1-FreeBSD on FreeBSD 12.3, I find that printf 'a\nb' | grep -zEo 'a\Wb' matches. printf 'a\nb' | grep -zEo a.b also matches in that it reports a zero exit status, but outputs nothing which looks very much like a bug.
Feb 10, 2023 at 11:50 comment added Stéphane Chazelas Possibly relevant: github.com/freebsd/freebsd-src/commit/…
Feb 10, 2023 at 11:47 comment added Stéphane Chazelas Can you possibly reduce it to a smaller reproducer? Like does printf 'a\nb' | grep -zEo 'a\Wb' match for you?
Feb 10, 2023 at 11:14 comment added Dhruv This is my grep version grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
Feb 10, 2023 at 11:13 comment added Stéphane Chazelas I can't reproduce with GNU grep 3.7
Feb 10, 2023 at 11:10 comment added Dhruv @StéphaneChazelas I am not asking for query. I want to understand the behaviour of the queries. Thanks for your suggestion though
Feb 10, 2023 at 11:04 comment added Stéphane Chazelas Try pcregrep -Mio '(?s)^\h*create .*?;'.
Feb 10, 2023 at 11:02 comment added Stéphane Chazelas In any case *? for non-greedy * is a perl operator. Very few grep implementations support it with -E.
Feb 10, 2023 at 10:56 history edited Dhruv CC BY-SA 4.0
deleted 6 characters in body
Feb 10, 2023 at 10:56 history edited Dhruv CC BY-SA 4.0
edited body
S Feb 10, 2023 at 10:32 review First questions
Feb 10, 2023 at 12:41
S Feb 10, 2023 at 10:32 history asked Dhruv CC BY-SA 4.0