Howdy folks.
I am working on a brochure in InDesign (CS4). It is a jewellery brochure with prices for wholesale (W) and suggested retail price (SRP).
Unfortunately they have been entered backwards, across the entire document, so all the wholesale prices are displaying suggested retail price, and vice-versa.
Is there a way to use GREP to crawl through the document and flip the prices?? I've attached a screen shot of the price line. The bold is a character style.
Thanks for any tips!
It worked here, so there's a good chance there's something different about what you have typed in the price line and what I entered, and I think I see it. I left out the colon after the SRP. Sorry about that.
Try it this way: (\d+(\.\d\d)*)( \(SRP\): \$)(\d+(\.\d\d)*)
If that still doesn't work, it's probably the spaces (there is a plain space before and after \(SRP):) and you could use (\d+(\.\d\d)*)(\s\(SRP\):\s\$)(\d+(\.\d\d)*) which will pick up any sort of white space in case there's a fixed width space or a tab.
Hi, You can use the following GREP. Hope it solves your replacements. I am new to GREP but its seems fun taking up the troubles and fixing in a snap.
(\(\w\): \$\w+) (\(\w{3}\): \$\w+\.\d+)
Basically this looks for any single character in ( ) exceding : and white space and the next with three characters in () exceeding :
Replace with $2 $1 and I guess you are done
That's an interesting approach, but it may be too specific. It presumes there are no decimal places in your first price (a reasonable assumption based on the example, but not really safe). I'm also not clear on how you are separating the the two prices form the text between so you can swap them...
Thanks Peter, I agree it may be too specific and should include some buffer for decimal places.
(\(\w\): \$\w+\.*\d+) (\(\w{3}\): \$\w+\.*\d+) - Updated
I have divided it on these two entities, anything between these are specifically looking for text like the example. Hope you can improvise on this also, would appreciate for your time. As already mentioned, IM new to this :-)
I think you misunderstand wht the OP needs to do. It's not a case of swapping the positions of the wholesale and retail groups, it's that the prices listed are swapped -- the whole sale number needs to be where the retail number is, and vice versa, so you need to define the string between the numbers as a separate sub-entity.
I'd have to test, but I think it will work. There are many ways to find the same text, obviously. In my expression I don't bother with anything that comes before the first digit inthe first price since that's all going to stay the same anyway, and I've made the decimal protion of the number a unit that may appear once, or not at all, just because that makes it less likely to a match anything other than a price, though that probably is not much of a risk in this case, particularly since I called out the specific intervening text. Yours will match any three-letter word in parentheses in that position.
Thank you very much Peter, this did the trick. The only minor issue was that the character styling got a bit messed, ie the ")" in "(SRP)" went from bold to regular, and some of the price numerals recieved the bold style. However that was really easy to fix with Find/Change formatting.
Thanks again!
How is the bold applied? GREP Find/Change can certainly screw up local formatting quite easily.
I suspect you should be using a nested style as part of the paragraph style applied to prices. Not seeing the whole thing I don't know what else might be in a paragraph, but if it's just the price line, create a Bold character style (should do nothing but make whatever type is there bold), then apply Bold though 1 : then [none] up to 1 ( and Bold again through 1 :. Since the bold is now part of the paragraph style, it will work no matter how you shuffle the prices , being triggered only by the positions of the colons and open parentheses.
North America
Europe, Middle East and Africa
Asia Pacific