# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/\$(.*):(.*)\;/$1/g;t' <<< "$font-heading : var(--font-heading);
$font-standard : var(--font-standard);
$body-font-size : var(--body-font-size);
$size-h1 : var(--size-h1);
$size-h2 : var(--size-h2);
$size-h3 : var(--size-h3);
$size-h4 : var(--size-h4);
$size-h5 : var(--size-h5);
$size-h6 : var(--size-h6);
$top-font-size: var(--top-font-size);
$product-font-size: var(--product-font-size);
$product-price-size: var(--product-price-size);
$product-detail-size: var(--product-detail-size);
$product-detail-title-size: var(--product-detail-title-size);
$footer-size: var(--footer-size);
/* $font-icon: 20px;
$font-small-icon: 21px;
$font-small: 14px;
$font-medium: 17px;
$font-bold: 300;
*/"
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