I need help in writing a RegEx able to detect 1 or more instance of a defined characters in a string (in my example an empty space) and replace with a single DASH.
I’m using at the moment this RegEx, it replace one ore more instances of an Empty Space in a string.
Regex.Replace(inputString, @"\s+", "-");
I would like have a similar approach but for another character example:
; or &.
Any idea how to solve it? Thansk for your time on this.
1 Answer