I am trying to get a space into every 4th number/digit (not character). This is what I come up with:
newStudentNumber := regexp_replace(newStudentNumber, '[[:digit:]](....)', '\1 ');
dbms_output.put_line(newStudentNumber);
result:
NL 2345 7894 TUE
What I actually want:
NL 1234 5678 944 TUE
My code replaces the number at every 4th place with a spacebar, instead of adding a space like the wanted result above.
Can anyone explain this to me?
Thanks in advance