Copy link to clipboard
Copied
Hi All
we got some GREP tags which we copied from InDesign CS3 to InDesign CS6. Is it possible that those tags don't work anymore? we use [[:punct:]] for example, but InDesign don't recognize the input...
Did Adobe made changes in CS6 the GREP process?
Thanks for your support!
Reto
Copy link to clipboard
Copied
As far as I know there have been only two changes in InDesign's GREP since CS3: in CS4 the Unicode properties were introduced, and in CS6 two new classes/wildcards: \v (vertical space), which matches \n and \r, and \h (horizontal space), which matches all white space.
InDesign still recognises [[:punct:]] by the way (CS6, CC). Which other Grep items don't work anymore for you?
Peter
Copy link to clipboard
Copied
i think only the [[:punct:]] doesn't work anymore...
very strange, maybe i should check that on a different client...
Did you test [[:punct:]] in CS6?
Thanks
Reto
Copy link to clipboard
Copied
> Did you test [[:punct:]] in CS6?
yep.
Try deleting InDesign's preferences. Exit InDesign, then start it and hold down Alt+Ctrl+Del (Windows) or the Mac equivalents.
Copy link to clipboard
Copied
tried but no success... i just don't understand why the GREP doesn^t work anymore.. here's the string:
(\d+[[:punct:]])\t(.+\t)(\d+\t)(\d+\t)(\d+\t)(\d+[[:punct:]]\d+\t)(.+)
with this table:
1. Basel 19 9 9 1 35 : 18 36
GREP find's 1 but the point isn't recognized by [[:punct:]]
Copy link to clipboard
Copied
It's not [[:punct:]] that's the problem, your expression is wrong. It contains (\d+[[:punct:]]\d+\t), which doesn't match. If complex expressions like yours don't work, break it down into small parts, then build it up.
Did you try the first part, (\d+[[:punct:]]) ? That works fine for me.
Peter
Copy link to clipboard
Copied
I did that test as at first and it didn't worked, but now it works fine with the [[:punct:]] don't ask me what i tried first...
the mistake must be in an other part of the string, i have to check that
thanks for youf advice!
Copy link to clipboard
Copied
retogreub wrote:
tried but no success... i just don't understand why the GREP doesn^t work anymore.. here's the string:
(\d+[[:punct:]])\t(.+\t)(\d+\t)(\d+\t)(\d+\t)(\d+[[:punct:]]\d+\t)(.+)
with this table:
1. Basel 19 9 9 1 35 : 18 36
GREP find's 1 but the point isn't recognized by [[:punct:]]
Your Grep cannot work for you.
Try this instead (if you need every part alone):
(\d+[[:punct:]])\t([^\t]+\t)(\d+\t)(\d+\t)(\d+\t)(\d+\t)(\d+\t)([[:punct:]]\t\d+\t)(\d+)
or this (will find the same):
(\d+[[:punct:]])\t(\w+\t)(\d+\t)(\d+\t)(\d+\t)(\d+\t)(\d+\t)([[:punct:]]\t\d+\t)(\d+)
or this:
(\d+\.)\t(\w+\t)(\d+\t)(\d+\t)(\d+\t)(\d+\t)(\d+\t)(:\t\d+\t)(\d+)
Copy link to clipboard
Copied
Peter,
I was not aware they have added \v & \h in CS6 and above...
Do you see any situations to use \h instead of \s for any white space?
The \v can be usefull to find both forced return & return, but do you have any example of a good user case for it?
Thanks!
Jean-Claude
Copy link to clipboard
Copied
[\r\n] is the equivalent of \v, so \v isn't a very useful addition.
\s matches all white space including \r and \s, \p{Zs} matches all white space except tabs and returns, and \h matches all white space except \r. So you can do things story-wide with white spaces and leave \r alone (and not rely on $).
Peter
Copy link to clipboard
Copied
Peter, thanks for the details. Always valuable...