How to replace Regex pattern based string in multiple places of a text file


I have to replace a few strings in a text file, but strings does not contain same values but they always follow a pattern.

Now, i want to replace all this strings[where ever this pattern matches], with null value?

i have a string in one of the line as “31004 / 02.11.2020 1 / 5”
and “31004 / 04.11.2020 2 / 5”

Now, i want to replace both this strings with null value in the text file.


Have you tested with System.Text.RegularExpressions.Regex.Replace()