• Login
Community
  • Login

Need help on replacing multiple spaces to a single space using Regular Expression

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 9.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    George Fan
    last edited by Nov 18, 2018, 1:16 PM

    Hi everyone,
    I’d like to ask for help on how to replace multiple spaces between words into a single space in a txt file like below:

    Nice to meet you!
    ->
    Nice to meet you.

    I’m sure there is a certain way in Regular Expression that is able to accomplish this function but don’t know where to start or how to write the expression in the “Replace” box.

    Is there anyone who have any idea?
    Thanks in advance and appreciate for your suggessions.

    Regards,
    George

    S 1 Reply Last reply Nov 18, 2018, 1:37 PM Reply Quote 0
    • S
      Scott Sumner @George Fan
      last edited by Nov 18, 2018, 1:37 PM

      @George-Fan

      Put a single space followed by a + in the Find what box. Select Regular expression search mode and press Find Next. You will see the results and should be able to build on that to do your desired replacement.

      1 Reply Last reply Reply Quote 0
      • G
        George Fan
        last edited by Nov 18, 2018, 2:34 PM

        That works, thank you so much Scott :-)

        1 Reply Last reply Reply Quote 1
        1 out of 3
        • First post
          1/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors