# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/^\h*
(?<linetype>[0123456])\h+
(?<color> (?&Number) )\h+
(?<xrot> (?&Number) )\h+ (?<yrot> (?&Number) )\h+ (?<zrot> (?&Number) )\h+
(?<xpos> (?&Number) )\h+ (?<ypos> (?&Number) )\h+ (?<zpos> (?&Number) )\h+
(?<xcam> (?&Number) )\h+ (?<ycam> (?&Number) )\h+ (?<zcam> (?&Number) )\h+
(?<xsca> (?&Number) )\h+ (?<ysca> (?&Number) )\h+ (?<zsca> (?&Number) )\h+
(?<filename>\S+[.]\S+)
$
(?(DEFINE)
(?<Number> [-]? \d+ (?> [.]\d* )? (?> [Ee] [+-]? \d+ )? )
)/${linetype} ${color} ($xrot,$yrot,$zrot) {$xpos,$ypos,$zpos} <$xcam,$ycam,$zcam> [$xsca,$ysca,$zsca] "$filename"/gmx;t' <<< "1 0 0 0 0 1 0 0 0 1 0 0 0 1 3024.dat
#linetype color XROT YROY ZROT XPOS YPOS ZPOS XCAM YCAM ZCAM XSCA YSCA ZSCA FILE"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html