Menu

Help: split a string into givan length

2008-04-16
2012-11-13
  • Nobody/Anonymous

    I would like to split a long string (with no spaces) into, let's say, 50 characters per line.  In perl or PHP you could use ^([a-z]{50}) to find the pattern and replace with \1\n.  But it seems that Notepad++ does not recognize [a-z]{50}.
    In Perl or PHP you could also insert \n at postion 51 of the string, but I do not know if it can be done in Notepad++.

    Thanks for all your help

    Weiting

     
    • Nobody/Anonymous

      TextFX

       
    • Fool4UAnyway

      Fool4UAnyway - 2008-04-16

      Select the text 50 and copy it to the Clipboard.
      Select all text to be formatted.

      Menu_____ : TextFX
      Submenu__ : TextFX Edit
      Option___ : ReWrap Text to (Clipboard or 72) width

       
      • Fool4UAnyway

        Fool4UAnyway - 2008-04-16

        Note: this will add a space to each separated part of the original line.