Help with GREP expression
- This topic has 2 replies, 3 voices, and was last updated 9 years, 6 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / Help with GREP expression
Learn / Forums / General InDesign Topics / Help with GREP expression
0 (0.0%) 1Â 6.7% 2Â 15.4%
I have a huge number of tables that I have had to import from FluidSurveys into excel and then into Indesign. The problem is that the cell has lost its formatting.
I need to be able to do a find/replace for the following (each number group is a separate cell (i.e. 0 (0.0%) is one cell):
0 0.0% 1Â 6.7% 2Â 15.4% needs to be
0 (0.0%) 1Â (6.7%) 2Â (15.4%)
I was able to write the one for the one with only zeros but can’t seem to get the one with the different numbers. Any suggestions would be great!
Just off the top of my head, this should work though
Find: (\d\s)(\d+\.\d%)(\t\d\s)(\d+\.\d%)(\t\d\s)(\d+\.\d%)
Replace: $1($2)$3($4)$5($6)
This works for me
(?<=\d\s)(.+?%)
($1)
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!