Usually I make my Regex patterns by myself, but I can’t figure this one out:
I need a Regex.Replace that replaces “‘Number’/’Number'” to “‘Number’von’Number'”.
Example: “2/5” schould become “2von5”.
The problem is that I can’t just replace “/” to “von” because there are other “/” that are needed.
You can replace
(?<=\d)/(?=\d)withvon, using lookaround.Another option is to replace
(\d)/(\d)with$1von$2(though that would fail on1/2/3).