You should look at using a Find/Change Grep, or implementing a GREP style. Which version of ID are you using?
ID CS5 7.0.4.
I played with GREP a little with no luck, not very savvy with scripting.
Can you get me started?
InDesign ships with a script called FindChangeByList.jsx which references a text file which instructs the script what find/change commands to make. This is great for cleaning up word files which have more than one issue, such as double spaces, double returns, space then comma etc.
The text file can be copied and then changed for your own purposes. I use such a solution to format 1800pp of text supplied to me in "old-school" wordperfect code to become formatted text ready for press.
in terms of finding the data separated by either
- many full stops;
- a tab; or
- many spaces
use this GREP in the find field:
and replace with
in the replace field. it is possible to assign a paragraph style by hitting the magnifying type icon to the right of the "Change Format" box at the bottom of the dialog box.
Cari Jansen (www.carijansen.com) has speaker notes from a GREP presentation she gave a while ago. look for the file "Speakernotes_GREP" on her website. GREP is worth the time to learn, especially as it not only can be used for find/replace, but it can format on the fly with GREP styles.
Thanks Colly, will give it a try.