Replacing or searching text with regular expressions is very common. But sometimes it is hard to get them right and you need some playground to try them out. In order to verify regular expressions i used to visit webpages like:
Recently i learnt about
M-x regexp-builder with which you can test
your regular-expressions interactively. Just enter the regular
expression and the text in your buffer will be highlighted
immediately. It even considers different capture groups and highlights
them in different colours. Very nice!