Hi,
I need a regex to replace hyphens in the middle of any word but not to touch leading or trailing ones or standalone ones. This is for use in .NET within Regex.Replace()
I've tried the following
\w[-]\w
but that also captures the character either side of the hyphen. As an example, what I need is for the following string
-test test-test -test
If the replace character was !, to become
-test test!test -test
Any help greatly received
Thanks
James