Loading ...
Sorry, an error occurred while loading the content.

21411Re: [NTB] Spacing walls of text

Expand Messages
  • Marcelo Bastos
    Oct 19, 2009
    • 0 Attachment
      Interviewed by CNN on 19/10/2009 07:43, bozlawless told the world:
      > Is it possible to add spaces to a bunch of text and add the space as shown
      It depends. If the rules for inserting spaces are clearly defined, then
      you can use find & replace, with regular expressions to do it.

      For instance, from your example, I notice that all groups begin with one
      -- and only one -- letter. No letters appear anywhere but the beginning
      of groups.

      Try this (without the quotes, and don't forget to tick the "use regular
      expressions" box):
      Find '([[:alpha:]])'
      replace ' $1'
      Notice that there is a space before the $ character.

      This will insert a space before every letter. There's a minor side
      effect of inserting a space to the beginning of the line. I probably
      could avoid it by using a more complex regular expression, but I'm too
      lazy to figure it out. It's easier to clean it up with a second
      find&replace pass:

      find '^p '
      replace '^p'

      this time, WITHOUT ticking the "use regular expressions". Notice the
      space in the end of the find string...


      ......<-Stealth Tagline
      * TagZilla 0.066.1 on Seamonkey 1.1.18
    • Show all 3 messages in this topic