Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

'Grep is making me insane'… or 'troubleshooting'

Return to Member Forum

  • Author
    Posts
    • #58212
      wasabi
      Member

      Hi, any help or suggestions would be very welcome!

      I'm trying to search for any instances of LT when they occur immediately after a numeral so I can change the LT to L.

      I am entering: (?<=/d)LT in the grep tab of the find change dialogue. I can see numerous instances of numerals followed by LT throughout the text, but I'm getting 'cannot find match'. The most maddening thing is that I have succesfully used this search already, but now it's not working. I've even created a new document, the only text on the page is 1LT. The grep search still produces no results. Locked layers, hidden layers etc are all unchecked. I am searching by 'document' (rather than selection, story, etc.)

      I would really appreciate any ideas. I intend to add this to a find/change script I have created, but I can't even get it to work in the find change dialogue box!!

      Thanks in advance.

      (PS backslash replaced by a forward slash)

    • #58214

      Hmm, no idea really. Can you try and see what happens with this?

      (?!D)LT

      (essentially, “LT” not preceded by not a digit :) — be warned, it will also pick up LT's at the start of a line …).

      You could try resetting your preferences; perhaps some leftovers of the Christmas dinner got stuck in ID's throat.

    • #58219
      wasabi
      Member

      Thanks Jongware,

      I have a bit more of an insight into what's happening this morning. If I restart indesign the search works. When I try to incorporate it into my script and run it, I get no results. I then retry the grep search within indesign and the search returns no results. Other basic searches for any digit, any paragraph return, any word etc still return results. I have a couple of other find/change scripts which don't cause this crazy behaviour, so I guess I need to look at this particular one.

      I tried the search you suggested, but with no results? I've also reset the preferences, but it hasn't made a difference.

      I think I'm now in the wrong forum area, but does the following look ok to you?

      grep {findWhat:”(?<=//d)LT”} {changeTo:”L”} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Change LT to L when preceded by a digit.

      cheers.

      (PS backslash replaced by a forward slash)

    • #58220

      I'm not an expert in FindChangeList ops (I still use the “old style” findchangelist, albeit much enhanced over the years by yrs truly ;) ), but the syntax seems correct. Double-check if there is one single tab, and no spaces at all, between each command — I've read elsewhere that's a sure killer.

      It doesn't explain why your InDesign goes out of whack, though. Malformed lines usually are plainly ignored.

      Oh, by the way, to insert a in a post on this forum, you have to type two of them: \. And if you edit your post, the double 's will have disappeared and only occur once, so you have to scrutinize your post again for all and double . Woe on you if you forget one, because you have to edit again, and then you're sure to miss yet another. Endless fun.

    • #58221
      wasabi
      Member

      ah is that how you do it!

      Well I started with a fresh 'FindChangeByList.jsx' and edited the support file to catch all the corrections needed and it works fine. This has been seriously driving me mental, so I'm glad I found a solution, even if I don't really understand what was going wrong. Thanks for your help!

      I've also been using the 'what the grep' script I downloaded the other day. Thanks for that too, it's been really helpful.

Viewing 4 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads