Hi, I have sed expressions that p→ßßes me off.
They work well according to regexp101 but not for sed, and it won’t explains why in any meaningful terms.
sed ‘s/(?<!\)(\r|\n)>//g’ essai.md |sed ‘s/(?<!\)(\r|\n)(?!(\r|\n|>))/ /g’|sed ‘s/(\s){2,}/ /g’|sed ‘s/(\r|\n){3,}/\n\n/g’|sed ‘s/\//g’
the first part says:
sed ‘s/(?<!\)(\r|\n)>//g’ essai.md
sed: -e expression n°1, character 20: ) or ) unmatched.
sed does not support every regex operation. Look-ahead is one of them.
You can check what is supported in the documentation (also with extended regex).
If you need these fancy functions then look for perl or python.
Also, do you know you can make sed replace command more readable if you use different separator than /?
For example sed 's;a/a/a;b/b/b;g' looks better than sed 's/a\/a\/a\//b\/b\/b\//g'.