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

Bug in Whatthegrep?

Return to Member Forum

  • Author
    Posts
    • #78266
      Henk Vrugt
      Participant

      Hi all

      I work on an international magazine with lots of numbers and amounts in the text.
      The publisher uses numbers without commas because some countries use periods instead. So things like ‘US$ 10 980 344′ can occur, as wel as ’10 000 tonnes’
      I wrote this little GREPstyle to stop these items breaking: ((£|US\$|€|Yen))?\d{1,3}(\d{3})*
      It works, but WhatTheGrep says the ‘\’ in ‘\$’ is incorrect. Escaping out the ‘$’ is such a basic thing that I can’t believe Jongware’s script seems to have such a bug.
      Just for my peace of mind: what’s happening here?

    • #78267
      David Blatner
      Keymaster

      Does the grep actually work in InDesign? I think it does.

    • #78314
      Peter Kahrel
      Participant

      \$ confuses WhatTheGrep probably because $ is a grep symbol. Other escaped grep symbols, too, probably confuse it. You could try \^ and and see what happens.

      Until CC, the $ symbol was problematic in another way as well. InDesign had problems finding more than one instance (on Windows anyway). In CS6 and earlier, using \x24 or [$] is a workaround.

    • #78485
      Henk Vrugt
      Participant

      Thanx, Peter and David
      This problem only seems to occur with the dollar sign:

      \~\|\+\?\*\^\$\.\{\}\{\}\(\)

      Literal (single) backslash
      \~ Literal tilde
      \| Unnecessary escaped character (safer to use ‘|’)
      \+ Literal plus sign
      \? Literal question mark
      \* Literal asterisk
      \^ Literal caret
      \$ Unnecessary escaped character (safer to use ‘$’)
      \. Literal period
      \{ Literal opening curly brace
      \} Literal closing curly brace
      \{ Literal opening curly brace
      \} Literal closing curly brace
      \( Literal opening parenthesis
      \) Literal closing parenthesis

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
Forum Ads