I am using SQL Developer 18.104.22.168. Tested this and got the same result. Looks like the 'Regular Expression' is working only in Search and not working Replace. This is working in SQL Developer 3.2. Seems to be a bug.
Aha!! Oh wait, I mean, cool. So we found a bug. Yay for us. How do we get paid for this? :-)