Replacing the info in the GREP script to run a bunch of functions at one time

Hello,
I have created a new JavaScript, by saving the script called "FindChangeByList.jsx" and giving it a new name, and replacing the text file with my new one, which is just a copy of the original with my one change.
I am trying to make my script do 2 functions that I use often, and I am already stuck on the first one.
grep {findWhat:"\d+:\d+\t"} {changeTo:""} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double spaces and replace with single spaces.
I am trying to find any digit one or more times, followed by a colon, followed by any digit one or more times, followed by a tab aand replace it with nothing.
does anyone know what I have wrong in this file?
thanks
babs

HI John,
OK-the puzzle gets more perplexing.
You are right, the examples do not escape out the backslash and they work fine.
So, I took ours, and removed one additional backslash at time to see if it was one in particular, and guess what? I removed all 3 and it worked?
BUT!!!! and there is a big but here....after the answers here that made it work, I continued with my request by adding a second line of code to follow.
Here is the second line of GREP after the one I had questioned.
grep    {findWhat:"\r"}    {changeTo:" "}    {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}    Find all returns followed by a tab character and replace with single returns.
When I put the double backspaces in, it was fine by itself, so, then I added this second line and all was still fine.
So, after reading your comment this morning, I removed the additional backslashes (one at a time) and it still worked. (I thought maybe, it was one in particualr giving me grief.)
So, I removed that second line of code, and left it as I had it during my original post, one backslash, and guess what, it didn't work?
Conclusion thus far: Without that second GREP request, the line before it  only works, if you have the escaped out the backslashs..once I put the second line back in, the first line works with just single backslash's???
Talk about strange?? huh???
any thoughts????
babs

Similar Messages

Maybe you are looking for