I have a long string of values in different rows. I need to insert a delimiter after every 4th character ( / ) there is no other consistency in the values (i.e. case, what the character is). I am trying to use the RegEx tool but can't figure out how to specify to insert the delimeter in this position.
Example:
String looks like this - 1040202
0990930
1141030
Needs to come out like this: 1040/202
0990/930
1141/030
.
Thanks in advance!
Hi @Barnana I mocked up a workflow that shows how to do this. Let me know what you think?
Hi @Barnana — You can write just a single line expression in the Formula tool as well:
REGEX_Replace([Field1], "(^....)", "$1/")
FYI:
^ sign asserts position at start of a line (beginning point)
. sign matches any character (4 dot signs for reading 1st 4 characters)
If this assists please mark the answer "Solved", if not let me know!
Hi @Barnana
Here is my take on it
Formula:
REGEX_Replace([Text], "(\d{4})(\d{3})", "$1/$2")
Output:
Hope this helps 🙂