I have a string where I need to replace all hyphens, but only between two delimiters, "clients_field_" and ":"
For example:
"clients_field_4741a6c5-3855-4455-b487-0b38b0038ae6": "info@domain.com",
"clients_field_78f225e0-1a78-4930-b251-ad2217baeb1b": "2017-07-26"
When all hyphens are removed it should look like this:
"clients_field_4741a6c538554455b4870b38b0038ae6": "info@domain.com",
"clients_field_78f225e01a784930b251ad2217baeb1b": "2017-07-26"
I have tried to find a working regular expression, but I need a little help. I tried the expression (?<=clients_field_)(.*)(?=:)
, but this will of course select everything between "clients_field_" and ":".
Look at my example
If I can get a few lines of C# code it would be amazing! But I think the RegEx Expression will be just fine! :-)
Thank you!
EDIT: Forgive me! Forgot to mention that the example above is part of a larger json string. So a simple replace with mystring.Replace("-", "") will not work.
EDIT2: Updated my example