In maven it is very easy to set properties in a pom with the following syntax:
...
4.06.17.6
Ihor Kaharlichenko's answer is basically correct except that it copies an error from the Codehaus documentation. There should be no '\' between the '$' and the '{'. The mojo works without it and doesn't work with it. Truly, with a basic understanding of regex and Maven, I couldn't see what the backslash was supposed to do and indeed it's wrong.
Stephen Connolly's answer correctly omits the backslash. Be careful.
This error has proliferated throughout SO and with Codehaus out of business will probably never get fixed.