Seriously, just look at mw:Extension:Replace Text to learn how to use regular expressions. It's linked above.