Find a path and replace with a path

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
HGAP
Posts: 2
Joined: Mon Jul 16, 2007 12:24 am

Find a path and replace with a path

Post 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" />
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post 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
HGAP
Posts: 2
Joined: Mon Jul 16, 2007 12:24 am

Post by HGAP »

Thanks Ben. I really appreciate your help!
Post Reply