Reply To: Advanced GREP Statement – This one is a doozy. Can anyone help?

Home Page / Forums / General InDesign Topics (CLOSED) / Advanced GREP Statement – This one is a doozy. Can anyone help? / Reply To: Advanced GREP Statement – This one is a doozy. Can anyone help?

#61791

All backslashes disappeared in your post (the forum editor makes single backslashes disappear; you need to type in two \ to get a single — and yes, I actually typed “” to get those two “\”) but on first sight I think the Romanization may not be working because of this bolded part (backslashes inserted where I thought appropriate):

Apply Style: Roman

(?<=[).s]|[d+s]|[;s])([lu]+)( )([.*?)?([lu]+)([. ]?)( )?([lu]+)

First of all you need to re-write it without the + (it's kinda hard to understand exactly what the entire expression does ;) ) because as it stands it would do “nothing” because the '+' is ignored anyway inside a [..] bracketed section. It just adds the '+' to the list of 'allowed' characters. But putting the '+' outside the brackets is no good either, since every test inside a single lookbehind needs to have the same net length, and you cannot use variable lengths at all.

Can you further pin-point the exact point of the expression where it fails? A good way to check what expression does what is disabling all of them but one. All you need to do is insert an invalid command at the very start — having a '*' there is invalid and will effectively kick the entire further expression out of the loop. To visually verify the expression works as expected, add this to the character style: Underline on, 12 pt thick, offset -3 pt, color Full RGB Green. That will highlight the applied style just nice.

This article was last modified on March 13, 2012

Comments (0)

Loading comments...