Automating InDesign with Regular Expressions by Peter Kahrel The unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification This page was updated April 16, 2007. UNCONFIRMED errors and comments from readers: {25} Line 3 in code; Change this line: var initials = txt.match( /[A-Z](.\s?[A-Z])+.(?=\s[A-Z][a-z])/g ); to this: var initials = txt.match( /[A-Z](\.\s?[A-Z])+\.(?=\s[A-Z][a-z])/g ); {25} Line 11 in code; Please change this line: initials[i].replace( /\.(?=\w)/g, '. ' ) ); to this: initials[i].replace( /\.\s?(?=.)/g, '. ' ) ); [26] Line 2 in first full code example; Please change this: match( /\b[a-z_]+\b/g ) to this: match( /\b[A-Z_]+\b/g ) (26) Second text paragraph; Please replace this: underscores instead of spaces and everything in lower case with this: underscores instead of spaces and everything in upper case