I have data that sometimes has a commas after 10 characters and some that don't. what i want to do is consistently have a comma after each 10 digits, unless there are only 10 digits. So basically i want the following:
45028357424502938101,4502938115 |
4502835734 |
4502755826450290882145029381104502938415 |
4502755826,4502908821 |
To look more like this:
4502835742,4502938101,4502938115 |
4502835734 |
4502755826,4502908821,4502938110,4502938415 |
4502755826,4502908821 |
I'm hoping there is a regex expression to help with this.
Thanks!
Solved! Go to Solution.
Honestly i dont know whether this can be solved only with regex
Here is a workflow for the task.
Output:
Workflow:
Hope this helps 🙂 I look for a regex way
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
Here is way using Regex and single formula
TrimRight(Replace(REGEX_Replace([Text], "(\d{10})","$1,"), ",,", ","),",")
Output:
Workflow:
Select tool is used to increase datatype size to avoid truncation.
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍