# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/\b(??px)(?<!(?<!\S)\.)(\d*)(\d)(?:\.(\d+))?px\b/$1.$2$3rem/gm;t' <<< "font-size: 10px;
border: 0px;
margin-top: 4px; // dont touch
margin-bottom: 12px;
margin-right: 50%;
margin-left: -12px;
padding-left: 120px;
padding-right: 8px;
border-radius: calc(50% - 1px); // dont touch
grid-template-columns: 1fr 44px 1fr;
margin-top: 36.4px;
border-width: 10.5px;
border-width: .3px; // dont touch
border-width: .6px; // dont touch
border-width: 3.3px; // dont touch
border-width: 6.6px 4px 8000px .34px;
margin-left: -1px; // dont touch"
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