Hello,
how can i adding spaces twice in between a sting line -
Current output -
ABCD1234-05Output
Expecting Output-
ABCD 1234-05 Output
Solved! Go to Solution.
@kauser
you meant you want to insert space between Group of Character and Number?
Hello @kauser,
Normally, with the sample string you shared, it would require a simple RegEx pattern such as
([A-Z]+)([0-9-]+)([A-Z]+)
replaced with
$1 $2 $3
to achieve the output required.
With that being said, there are certain questions that should be answered for a healthier parsing method:
1. Does the first part contain in some rows: Special characters, numbers [0-9] or non-English characters? (First part containing numbers might make it impossible to build a RegEx pattern for this scenario based on where the numbers take place in the first part)
2. Does the second part contain in some rows: Other characters than numbers [0-9] and dash ("-") character?
3. Same question for the first part applies to last part.
Without a longer sample with more rows, it might not be possible to build a correct RegEx pattern.
I am providing a sample workflow as an attachment, but please be aware that it was built on the sample string so it is a high probability that it won't be able to parse all rows correctly.
@kauser try this
REGEX_Replace([FieldName], "([A-Z]+)(\d+)(-\d+)([A-Za-z]+)", "$1 $2$3 $4")
Mark done if solved.