Page 1 of 1
Posted: Tue Mar 13, 2007 7:42 pm
I've checked through the other posts, and I think I understand how to do a variable find and replace, but I'm missing the obvious it seems...
I have a few html files that have code like this in it...
I need to replace it with:
So should I be doing a simple find and replace or a batch?
I think this is how it should be done...
Does this make sense at all?
Posted: Tue Mar 13, 2007 7:58 pm
In this version of Advanced Find and Replace you can use regular
expressions on Batch Replace tab.
The right regular expressions pair is:
. - dot before jpg is reserved char in search for (but not in replace
with!). So you have to escape it with \
Then in your example you have to put ( before th_
I verified it worked as expected.
Posted: Wed Mar 14, 2007 3:20 pm
I see... so I should be putting this in the expression builder dialog box.. and not manually... correct?
BTW: It did work...
Posted: Wed Mar 14, 2007 4:31 pm
For testing you should put it into Regular Expressions Builder.
Otherwise (for real replace) you should put it into Batch Replace
Posted: Fri Mar 16, 2007 8:38 pm
Still doing some work on this... and for some reason the batch replace grid does not seem to like the '$FILE' piece... is the $ a reserved character?
I notice that it seems to duplicate a large part of the text of the document. e.g. I have a 5x5 table... after the replace, I have a 5 x 10 table.
Posted: Fri Mar 16, 2007 8:54 pm
Exactly. $ is a reserved char.
So in Search For part you should put \ before $ like this:
But in Replace With part you can use $ without \
For example you can use $FILE in Replace With part but you should use
\$FILE in Search For part.
Posted: Mon Mar 19, 2007 1:44 pm
Now what happens in the scenario where there is no "$FILE" in the search part, but is being added in the replace?
e.g. if I am searching for:
and replacing with:
The original string does not contain "$FILE" but is being inserted...
Even after some further testing, I guessing that "$FILE" is another reserved word... I think this copies the whole file and pastes it back in.. which might explain why my tables are being super-sized!