You can also include some code to check the string output and ensure It can be matching Whatever you hope before you do the regex replace. I bumped into this issue utilizing docker build. What exactly is your docker Variation? Upgrading to the latest version assisted me address the issue! https://m3mwoodshiresector107gurgaon.blogspot.com