Remove Spaces Between Characters

Remove Spaces Between Characters

10
Basic UserBasic User
10

    Jan 20, 2015#1

    Hello.

    Is it possible to remove all space between characters in a text document so that everything is compacted onto one line? Space typically varies between 1 and 10 spaces, and some empty lines between lines also.

    So if a text document had 3 lines:

    Cat
    Mouse
    Dog

    or

    Cat

    Mouse

    Dog

    ...it becomes:

    CatMouseDog

    Some files have far more lines of text but would take too long to manually remove all the empty space.

    Thanks.

    11327
    MasterMaster
    11327

      Jan 20, 2015#2

      Search->Replace
      Find what: [\r\n\s]
      Replace with: leave this field empty
      Check In Current file
      Check Regular expressions and choose Perl
      Check Replace all from top of file
      Press Replace all button ....
      It's impossible to lead us astray for we don't care even to choose the way.

      10
      Basic UserBasic User
      10

        Jan 21, 2015#3

        Many thanks. That was exactly what I wanted 8)

        PS Sorry for the late reply, I only got the topic notification e-mail this evening.

        6,605547
        Grand MasterGrand Master
        6,605547

          Jan 22, 2015#4

          One more note: \s+ would be enough as search string as the character class referenced by \s includes all white spaces, see white space section in Perl Regular Expression Character Classes documentation.

          Please note that in UltraEdit the Boost regular expression library is used and not ActivePerl. Therefore small differences are possible in character class set definitions, too.
          Best regards from an UC/UE/UES for Windows user from Austria

          11327
          MasterMaster
          11327

            Jan 22, 2015#5

            Thank you Mofi for clarifying this! Really.
            It's impossible to lead us astray for we don't care even to choose the way.