7 Replies Latest reply on Mar 15, 2018 12:48 PM by Zale Zhao

    Need REGEXP_REPLACE to add thounsands seperators

    Lee Forst

      I'm not good at regular expressions.  So I'm struggling with implementing the correct syntax to add thousands separators for a whole number converted to a string. 

       

      Consider the following

      REGEXP_REPLACE(str(round([My Value],0)),"<pattern>","<replacement>")

       

      So 123 would be 123

      1234 would be 1,234

      12345 would be 12,345

      123456 would be 123,456

      1234567 would be 1,234,567

      12345678 would be 12,345,678

      123456789 would be 123,456,789

      1234567890 would be 12,34,567,890

      and so on...

       

      Thank you!