Skip to main content
Farid Ely
Participating Frequently
April 19, 2023
Question

White spaces before and after punctuation marks-Is there a GREP?

  • April 19, 2023
  • 3 replies
  • 1433 views
Hello my dear experts...
I was thinking of a viable solution for the wrong spaces before or after the punctuation points.
Is there an efficient way to use grep to remove the extra white space before the punctuation, and add the missing white space after the punctuation mark (except for the punctuation mark before the brackets)?
Sometimes messy drafts come to you and you need to fix these errors before moving on to work on them, and this has been repeated with me recently.
Thanks in advance.
    This topic has been closed for replies.

    3 replies

    Nancy OShea
    Community Expert
    Community Expert
    April 20, 2023

    I use a word processor (MS Word) to check spelling, grammar & punctuation before I export documents to other apps.  That gets rid of  99% of problems.

     

     

     

     

     

    Nancy O'Shea— Product User & Community Expert
    Farid Ely
    Farid ElyAuthor
    Participating Frequently
    April 20, 2023

    Oh, thank you, but with my modest experience in Word, I think that this requires me to follow the correction process line by line. That's why I prefer InDesign because it usually saves time, especially through the Grep commands.

    jane-e
    Community Expert
    Community Expert
    April 20, 2023

    @Farid Ely 

     

    GREP will do this. I am not in my office now, but you can put each part into parenthesis to make them a group in the Search bar, then Paste only the groups you want.

     

    Sorry, I can't remember the exact syntax, but if, for example, the text is "1. Heading" ,  you might search for (any number repeated)(.)(text) and replace with group 1, followed by Return, followed by group 3. It's faster than Word, and you can save your search.

     

    Someone with give you the exact GREP code, or I can look at InDesign tomorrow and give you a better answer.

     

    Jane

     

    jane-e
    Community Expert
    Community Expert
    April 19, 2023

    @Farid Ely 

     

    This sounds like InDesign? If it is, we can move your post from Using the Community to InDesign for you.

     

    Jane

     

    Farid Ely
    Farid ElyAuthor
    Participating Frequently
    April 20, 2023
    Oh yes, thank you very much. I was in a hurry and did not notice where I wrote. Thank you for moving the problem to its own section. Yes, I use InDesign.
    Peru Bob
    Community Expert
    Community Expert
    April 19, 2023

    Please tell us what Adobe application you are using so that this can be moved to the proper forum for help.

    Farid Ely
    Farid ElyAuthor
    Participating Frequently
    April 20, 2023
    Oh, thank you very much. I was in a hurry and did not notice where I wrote. Thank you for moving the problem to its own section. Yes, I use InDesign.