Factorize replaceIn
Merge pull request #6698 from lucasmichot/5.0-foundation-appname-replacein

[5.0] Foundation : Factorize replaceIn in AppNameCommand