Skip to content

Instantly share code, notes, and snippets.

@chuchuva
Created August 22, 2024 23:53
Show Gist options
  • Save chuchuva/3aa588c0cfa58b1b905ff28406261b28 to your computer and use it in GitHub Desktop.
Save chuchuva/3aa588c0cfa58b1b905ff28406261b28 to your computer and use it in GitHub Desktop.
How to multiply all values in SVG path by 10
Regex.Replace("M87.3,41.08v26.68c0,9.08-7.41C79.89,24.61,87.3,32,87.3,41.08z", "([0-9\\.]{0,})", (m) =>
{
decimal i;
if (decimal.TryParse(m.Value, out i))
{
return (i*10).ToString("0.##");
}
return m.Value;
}, RegexOptions.None)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment