Nora wrote:
I downloaded the Grep for windows. But I don't quite see, how it should help
me with my problem.
I want to replace the last line of each document. These lines are not
completely similar in their content. But all of them start the same way. (so
simple find and replace won't help)
Did you understand me that way? And if yes, how should the Grep help me?
As far as I know grep is a search tool only - except the version
mentioned (Wingrep 2.2 or higher) has some extra features, e.g.
if it supplies an option to delete the line matching a search ex-
pression it would solve your problem:
The regular expression ^<\?Pub identifies all lines beginning
with <?Pub (^ is for beginning of line, \ is the escape character
becaus ? has a special meaning).
If you have access to *nix or cygwin you could apply the following
command to each xml-file:
cat xmlfile.xml | sed '/^<\?Pub/d' > xmlfile-new.xml
This will delete all lines starting with <?Pub - Wingrep 2.2
might have similar features.
HTH,
Gerald