I need to replace some sentences from a bunch of documents. All sentences are nearly the same, but in some documents are breaks, missing or added words / characters. I tried to match the first and the last words, but thats not accurate.
Is there any way or does anyone have an idea how to replace sentences that just nearly matches?
Example Lets say i want to replace the following sentence.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
Here is the sentence with a break
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt
A missing comma
Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt
And missing words
Lorem ipsum dolor sit amet sadipscing elitr, sed diam nonumy invidunt
.*
or some stronger constraint (i.e. (,|\.|\n|\t){0,3}, no more than 3 of either , or . or newline or tab) between the must-haves. - fo_x86