Page 1 of 1

Find a path and replace with a path

Posted: Mon Jul 16, 2007 12:53 am
by HGAP
I'd like to find a path in 1700 xml files and leave the alphanumeric characters unchanged in the path. The only change needed is to remove two leading backslashes (\\) and replace forward slashes (/) between the directories with backslashes (\) I've tried several things in WildEdit without luck. Any suggestions would be appreciated. Thanks, Howard

Here's an example the original path

<INPUTFILE NAME="\\\\ftwanyocrfs01/AnyDoc/OCR for AnyDoc/imagesPledge/20070405/00022046.tif" FORMAT="TIF" RECLEN="3999" />

note: the "\\\\ftwanyocrfs01/AnyDoc/OCR for AnyDoc/imagesPledge/" part of the path is always the same in all 1700 files. The date (20070405) and numeric filename (00022046.tif) will be different in each of the 1700 files.

Here's what the path needs to look like

<INPUTFILE NAME="\\ftwanyocrfs01\AnyDoc\OCR for AnyDoc\imagesPledge\20070405\00022046.tif" FORMAT="TIF" RECLEN="3999" />

Posted: Fri Jul 20, 2007 3:18 pm
by ben_josephs
1.
Find what: \\\\
Replace with: \\

[ ] Regular expression [i.e., not selected]
[ ] Replacement format [i.e., not selected]

OR

Find what: \\\\\\\\
Replace with: \\\\

[X] Regular expression
[X] Replacement format

OR other permutations.
2.
Find what: /([^>])
Replace with: \\$1

[X] Regular expression
[X] Replacement format

Posted: Sat Jul 21, 2007 10:48 pm
by HGAP
Thanks Ben. I really appreciate your help!