View all expressions
Interpolation

Number Counter With Separators

Formats a Slider Control value to two decimal places and adds thousands separators using periods.


num = effect("Slider Control")("Slider").value.toFixed(2).toString().replace(".", ",");
function addCommas(x) {
    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
}
addCommas(num);

Number Counter With Separators

Practical use case

Neatly formats large financial figures (e.g., "1.500.000") from a slider for on-screen display.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image