logo elektroda
logo elektroda
X
logo elektroda

Converting Spaces to Newline Characters in Notepad: Step-by-Step Guide for Text Conversion

speaker1 35958 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15122219
    speaker1
    Level 10  
    Hello

    I need to replace spaces with enter characters in the text. I know that it can be done easily in Word, Excel etc. but I'm only interested in the notebook.

    Text before conversion:

    Ala has a cat

    After swapping:

    Ala
    has
    the cat

    Of course, I use the function convert to ctrl + H and type:
    Enter: Alt + 013, but that doesn't work.

    Space: Alt + 032- Works for spaces, but does not for enter.

    Greetings.
  • ADVERTISEMENT
  • #2 15124036
    krzysiozak
    Level 39  
    Unfortunately, I will not give you an answer to your question, but something that may put you on the right path.
    I can get [Enter] by pressing ALT-13 [So no zero]. [?]
    Good luck.
  • ADVERTISEMENT
  • #3 15124218
    fakvat
    Level 17  
    Use edit plus instead of notepad. is a good replacement, first of all it is not a mare MS Word program. It has many possibilities, one of which is regular expressions. A powerful tool for manipulating text data. You do it this way
    CTRL + H -> replace -> you mark regular expressions -> space as a character searched for replacement at the bottom \ n as a line break

    ps. in linux it's easier to cat old | tr '' '\ n'> new
    nothing is simple in a notebook, not even such trivial things
  • ADVERTISEMENT
  • #4 15862078
    mmmaras
    Level 11  
    Edit Plus is shareware. The method described by a colleague fakvat obviously works nicely, however the same can be done using a free text editor called Notepad ++

    To make this change, just click CTRL + H then in the box " Search text "enter" space "(or another character / text that we want to go to a new line), and below in the field" change to "we type" \ n ".

    Additionally, below in the box " Search mode "you have to select an option" Regular expressions ".
ADVERTISEMENT