Hi, I have the following meanings
000001010016C02AB 111* 000001010016C02 111H 000001010016C 111
And the expected result
00000101001,C02AB,* 00000101001,C02,H 00000101001,C,
Values โโmay vary. The length of this line will always be 23. If the character is absent, the position will be filled with a space. Regex i have now
(^.{11})[0-9](.{5})(?:.{5})(.*)
But when using this regular expression in the second group, white spaces are returned. I want these white spaces to be removed.
Current output:
00000101001,C02AB,* 00000101001,C02 ,H 00000101001,C ,
Can someone help me remove spaces from the second group?
Demo
source share