Use extractregex to only put the number

How can I use extractregex with the clipboard so it only puts the number of the values I copy, here's an example:
$12,345.67

I want the feature to only display the number without any of the non-digit characters

Thank you in advance!

Hi @jfierro , try this:

{value="$12,345.67"}
{=join(extractregexall(value, "\d"), "")}

You can replace the string with {clipboard} to use your clipboard instead. Let me know if it works for you.


You mentioned "without any of the non-digit characters", but I assume you wanted to keep the decimal sign, you can do that like so:

{value="$12,345.67"}
{=extractregex(replace(value, ",", ""), "\d+(?:.\d+)?")}

Both snippets are really good thank you so much for your help!