You can try this approach, easy approach:
1. Read the file using FileStream into a byte array.
2. Then use a loop to iterate through out the array searching for the pattern
Try googling or see this http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm
3. Then replace the bytes of the array and save it.
|