1 Reply Latest reply on Jun 28, 2015 2:38 PM by Peter Spier

    How can I use Find and Replace to change format of text, but not value?

    jeffg45492488

      Howdy,

       

      I have to do a ton of edits where the only change is to delete a space in between a number character and an anchor object.

       

      As an example, what I'm working with looks like this:

       

      32[space][anchor]

       

      and I want it to look like this:

       

      32[anchor]

       

      However, it's not always 32. It could be 76, 88, 105, or any number.

       

      I tried using Find and Replace to find this:

       

      ^9 ^a

       

      and replace it to

       

      ^9^a

       

      However, that literally changes the text to ^9^a.

       

      Is there anyway to change the format to remove the space, but keep the values?

       

      Thanks!

        • 1. Re: How can I use Find and Replace to change format of text, but not value?
          Peter Spier Most Valuable Participant (Moderator)

          You need to use the GREP tab.

           

          You can search for (\d)\s(~a) and replace with $1$2 or you can search for (?<=\d)\s(?=~a) and replace with nothing.

           

          In the first case you are looking for any digit, any white space, and the anchored object marker and replacing with the digit and marker, deleting the space. In the second you are looking for any space that is preceded by a digit and followed by an anchored object marker and replacing it with nothing, which deletes it.