Problem statement: I am currently working on a project where I need to convert 4-digit numbers into a versioning system format. Specifically, I want to insert a dot (.) after each digit in the number. For instance:
Input String: 6536 Desired Output: 6.5.3.6
To achieve this, I tried using the “Value Mapping” feature with Regex, but unfortunately, I haven’t been successful. Here’s the regex pattern and display text that I’ve been using:
Regex Pattern: \d\d\d\d Display Text: $1.$2.$3.$4
However, this doesn’t seem to be working as expected, and I’m not sure what I might be doing wrong.
Follow the steps:
Step 1 : Create table and insert data in it.
Note : In my case use postgresql
Step 2 : Create dashboard and select table visualizations
Step 3 : Fetch data using query
Output:
Step 4 : Click on Add field override
Step 5 : Select Fields with name matching regex
Step 6 : Click on Add override property
Step 7 : Select Value mappings > Value mappings
Step 8 : Click on Add value mappings
Step 9 : Select Regex
Step 10 : Map the value then click on update.
Final output