Monday, March 29, 2010

Find/Replace Issue

I have a very long list of names I need to edit and hundreds have ^^ before their name I need to change to %26gt;%26gt; and hundreds have ^ after their name I need to change to %26gt;



I cant seem to change the ^^ before names without it also changing the ^ after the name.



tried whole word and quotes but that did not help either.



any suggestions? Thanks.
Find/Replace Issue
The Search picks up both single and double circumflexes because of a slight oversight of your side: the circumflex is a

i special

character in the Search box. It indicates that the character following is to be parsed as, for example, a paragraph return (^p), a tab (^t), or an en-dash (^=). Usually, there is an 'escape' for the escape character as well. Inspecting the drop down menu on the right of the Find field shows ID calls it the 'caret' character, and choosing it inserts the code for a

i single

occurrence: ^^

So, to search for the double occurrences, you need to search for ''^^^^''.
Find/Replace Issue
Tanks, worked perfectly. You save me a lot of work.

Yer welcome.



If you happen to use CS3 or CS4, use GREP to save a bit more time. That'll do the trick with just a single replace.



In the Find field, type



%26gt;\^\^(.*?)\^



and in the Replace field,



%26gt;%26gt;%26gt;$1%26gt;



Then hit Replace All. Note the different escape character, as this is GREP, which has different rules. (The caret still needs escaping because it is also a special GREP character.)



If you need to do this on more than one file, click the diskette icon at the top of the dialog. Give it a reasonable name, and it's ready to be recalled whenever needed.

No comments:

Post a Comment