Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static public void ReplaceInFile(string filePath, string searchText, string replaceText)
- {
- StreamReader reader = new StreamReader(filePath);
- string content = reader.ReadToEnd();
- reader.Close();
- content = Regex.Replace(content, searchText, replaceText);
- StreamWriter writer = new StreamWriter("ute.nfo");
- writer.Write(content);
- writer.Close();
- }
Add Comment
Please, Sign In to add comment