NATHANIEL HENDERSON
  • Books
    • Naioniverse
  • About/Contact
  • Indie Author Freebies
  • Blog

Using Regular Expressions to Speed Up Editing

12/4/2025

0 Comments

 
While writing Duplicity (and editing Centricity), I vacillated on my number formatting. There are different options, but like most formatting decisions, whichever standard you choose, it should be consistent. So, I needed a way to quickly find all the numbers in my manuscript. It’s super slow to search for each number one at a time. Regular expressions to the rescue! 
I feel like I’m late to this party. Fashionable late? Probably not.  
Regular expressions (regex) are powerful search parameters that allow for highly customizable targeting. Most word processing software has, within its search function, a regular expressions input option. While they may look intimidating at first, regex can save hours of manual editing by automating tasks like finding repeated words, checking formatting, cleaning drafts, and analyzing text patterns.  
The one I used for locating numbers in my manuscript: -?\b\d+(?:\.\d+)?\b
 It will find integers, decimals, and even negative values. 
Additional expressions:  
For catching repeated words, \b(\w+)\s+\1\b highlights duplicated words such as “the the” or “and and.” 
If you're editing dialogue, you might want to identify lines that start with extra spaces. The pattern ^\s+ will flag leading whitespace at the beginning of lines. 
To locate all capitalized words \b[A-Z][a-z]+\b is useful for scanning proper nouns or ensuring character names are spelled consistently. 
You can even check sentence spacing with \.\s{2,}

It 
helps find places where two or more spaces appear after a period.
 
Adding a few regex tools to your repertoire will make your editing process faster and more precise. At least, it has for me. There are a huge number of expressions out there, so hunt down the ones you need and make your life a little easier.  
Happy writing! 
0 Comments

    DREAD ORANGE
    Fresh squeezed grit.

    Follow Dread Orange on Facebook.

    Nathaniel
    Henderson

    An author living and working in Tokyo, Japan.
    Learn More-->

    You can grab a copy of Centricity, my sci-fi espionage thriller, here on Amazon.

    Archives

    January 2028
    December 2025
    January 2024
    January 2022
    November 2021
    January 2021
    November 2020
    October 2020
    April 2020
    March 2020
    October 2019
    September 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018

    Categories

    All
    Author Background
    Japan
    Naioniverse
    Reviews
    Science Fiction Extras
    Worldly Adventures
    Writing Tips

    RSS Feed


    2021 © Nathaniel Henderson
Site powered by Weebly. Managed by JustHost
  • Books
    • Naioniverse
  • About/Contact
  • Indie Author Freebies
  • Blog