#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "\$(.*):(.*)\;"
Local $sString = "$font-heading : var(--font-heading);" & @CRLF & _
"$font-standard : var(--font-standard);" & @CRLF & _
"$body-font-size : var(--body-font-size);" & @CRLF & _
"$size-h1 : var(--size-h1);" & @CRLF & _
"$size-h2 : var(--size-h2);" & @CRLF & _
"$size-h3 : var(--size-h3);" & @CRLF & _
"$size-h4 : var(--size-h4);" & @CRLF & _
"$size-h5 : var(--size-h5);" & @CRLF & _
"$size-h6 : var(--size-h6);" & @CRLF & _
"$top-font-size: var(--top-font-size);" & @CRLF & _
"$product-font-size: var(--product-font-size);" & @CRLF & _
"$product-price-size: var(--product-price-size);" & @CRLF & _
"$product-detail-size: var(--product-detail-size);" & @CRLF & _
"$product-detail-title-size: var(--product-detail-title-size);" & @CRLF & _
"$footer-size: var(--footer-size);" & @CRLF & _
"/* $font-icon: 20px;" & @CRLF & _
"$font-small-icon: 21px;" & @CRLF & _
"$font-small: 14px;" & @CRLF & _
"$font-medium: 17px;" & @CRLF & _
"$font-bold: 300;" & @CRLF & _
"*/"
Local $sSubst = "$1"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm