I have a column with a series of 6-digit numbers and I need to insert 2 zeros from the 3rd position:
484783 -> 48400783 653923 -> 65300923 etc.. I have tried with \d{4}+00 but I think I am too far away can you help me please ?
I have a column with a series of 6-digit numbers and I need to insert 2 zeros from the 3rd position:
484783 -> 48400783 653923 -> 65300923 etc.. I have tried with \d{4}+00 but I think I am too far away can you help me please ?
You can store the first three digits of the number in one group, and all the remaining digits in another group. Then you use those groups in the substitution chain.
That is, the regular expression would be:
And the replacement string would be:
Well
$1
, it will expand to the first group, and$2
to the second.working demos
Note : The replacement string syntax may vary depending on the programming language you are using. In python or PHP it could be
\g<1>00\g<2>
, for example.