Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Aug 2025 02:22:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 253893] sed "/^\s*$/d" complains about trailing backslash (\)
Message-ID:  <bug-253893-227-ZU6fsihSqo@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-253893-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893

--- Comment #28 from Kyle Evans <kevans@freebsd.org> ---
(In reply to Eric from comment #26)

I was looking at this one again, and I think libregex is mostly fine here:

---
% echo 'a b' | grep '[a\s]b'
% echo 'asb' | grep -o '[a\s]b'
sb
% echo 'a\\b' | grep -o '[a\s]b'
\b
% grep -V
grep (GNU grep) 3.7
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and others; see
<https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
---

On FreeBSD:
---
kevans@ifrit:~$ echo 'a b' | grep '[a\s]b'
kevans@ifrit:~$ echo 'asb' | grep -o '[a\s]b'
sb
kevans@ifrit:~$ echo 'a\\b' | grep -o '[a\s]b'
\b
kevans@ifrit:~$ grep -V
grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
---

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-253893-227-ZU6fsihSqo>