raven_over_snow@yahoo.com [sed-users]
2017-01-14 16:58:46 UTC
I'm trying to use super-sed's perl regex /S flag, but can't get it to work at all. This would be a very handy tool, if only I could understand how it's used! For example, I expect the following command will match and replace the pattern which spans across a newline to be replaced with Xs:
echo "(123) 456-7890\n(456) 567-9050" | sed -R -e "s/78.*?5/x/S" So, I am expecting this output:
(123) 456-78XX XXXXXXX67-9050 Instead I get (no match):
(123) 456-7890 (212) 567-9050
[Non-text portions of this message have been removed]
echo "(123) 456-7890\n(456) 567-9050" | sed -R -e "s/78.*?5/x/S" So, I am expecting this output:
(123) 456-78XX XXXXXXX67-9050 Instead I get (no match):
(123) 456-7890 (212) 567-9050
[Non-text portions of this message have been removed]