Factorize replaceDigitsBetween
Merge pull request #5788 from lucasmichot/4.2-validator-replace

[4.2] Validation : factorize replaceDigitsBetween