Breaking up a list to extract numbers and sum them up

{clipboard="Biologia II - $5000.85, Física y Química II - $500, Historia II - $1090, Carlomagno. El padre de Europa - $984, para Santiago Soler de 2do. Año."}
{=clipboard} <= This is the data that we've placed inside the variable called "clipboard"

{note: preview=no}
{parts=splitregex(clipboard, "\$([\d\.]+)")}
Here I'm using the splitregex function to split up the data in "clipboard", startting with and excluding the character $ (and a backslash before it to indicate that it should be interpreted aas a character, NOT a command), followed by any digits and periods. This turns the data into a list, which I'm assigning to the variable "parts". See below.
{endnote}

{=parts} <= This is the data contained in the list that we created above.

{note: preview=no}
{numbers=filter(parts, (x, i) -> isEven(i))}
Here I'm using the filter function to filter the data inside the variable "parts". "x" represents each value in the list, while "i" represents the index (i.e. the number representing the position of that item in the list). With the filter function, I'm telling Text Blaze to ONLY take the list items whose position is even - hence the isEven(i) function. Then I'm putting the result of this whole process inside the variable "numbers".
{endnote}

{=numbers} <= This is what's inside the variable "numbers", which we created above. It's a list containing every item in an even position inside the list "parts". This leaves us with just the numbers.

{=sum(numbers)} <= the sum function sums all of the items in a list — in our case, all of the items in the list "numbers".