Unix [SOLVED]: Sed command with regular expression and replace Home › Forums › Unix › Unix [SOLVED]: Sed command with regular expression and replace Tagged: regex, sed, shell, unix Viewing 1 post (of 1 total) Author Posts January 4, 2018 at 2:25 am #37019 Anonymous Question I am new to sed command and regular expressions. Could anyone help me to explain the below command echo "FIXTEST_XYZ 23040/tcp # 127.0.0.1:23040" | sed -n 's/^FIXTEST_([A-Za-z0-9]+)s+([0-9]+)/tcps+#s*([A-Za-z0-9.]+):([0-9]+)s*/1 2 3 4/p' Thank you for your help !! Author Posts Viewing 1 post (of 1 total) You must be logged in to reply to this topic.