Regex how to match all end of line except empty line?
If I have text:
AAAAAA
BBBBBB
CCCCCC
DDDDDD
EEEEEE
FFFFFF
GGGGGG
HHHHHH
I want to match the entire end of the line except empty lines and replace the end of the line with a tab. [^\s]$
partially works, but also matches the last character of a nonblank string. [^^]$
does not work. What's the correct regular expression?
+3
source to share