* add common helpers Co-authored-by: Dmitry Shibanov <[email protected]>
* rework replacement function to use the same pattern like windows * remove old replacement