@nikivi, don't worry, this is a common mistake.
The more KM RegEx you personally create (and debug) the sooner stuff like this will come intuitively to you. This is one of the first things to check as part of the RegEx debug process.
Keep working with RegEx. There is always some trial-and-error involved, but more so in the beginning.
LOL. So, here I was, reading along and thinking "Yeah, I make that mistake a lot too."
And then I got to thinking, "Wait a minute... I know a solution to that problem!" A minute or two later, and I now have a couple of Favorite Actions for doing regex search and replaces.
That thwack sound you heard was my hand hitting my forehead. Why didn't I think of it before now? sigh
It's sufficiently common that I hope to try to detect it in the future a put some sort of indication - it'll have to be unobtrusive enough to be un-anoying when it is intentional, but intrusive enough to get noticed.