Download raw body.
sed vs gsed mismatch
On Sat, Feb 10, 2024 at 11:53:28PM -0800, Greg Steuck wrote: > Does anybody understand why /usr/bin/sed doesn't match gsed's behavior here? > > % echo ' LLVM version 13.0.0' | gsed -n -e 's/.*version \(\([0-9]\+\.\)\+[0-9]\+\).*/\1/gp' > 13.0.0 > % echo ' LLVM version 13.0.0' | sed -n -e 's/.*version \(\([0-9]\+\.\)\+[0-9]\+\).*/\1/gp'; echo > > % > + is not a special character in basic regular expressions. If you want to use it, you need sed -E. But then you must not escape + and the parentheses.
sed vs gsed mismatch