1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

replacing commas with new lines

Discussion in 'HTML, Graphics & Programming' started by oneilldo, 18 Feb 2006.

  1. oneilldo

    Wise Guy

    Joined: 16 Jan 2003

    Posts: 1,822

    Help my mind has gone blank. I am trying to sort out some data so I can import it easilt into a spreadsheet and then a DB and can't remember how to do the following easily. Change the file in format.
    hello, test, hello2, test2
    into the following format
    hello
    test
    hello2
    test2
    i.e. all i want to do is search and replace ', ' with a new line character.
    Any help will be good to help my mental block.

    Thanks
     
  2. Augmented

    Soldato

    Joined: 18 Oct 2002

    Posts: 5,464

    Location: London Town

    You'll need to replace ", " with "\n". How you do that depends on your search-and-replace tool of choice.
     
  3. oneilldo

    Wise Guy

    Joined: 16 Jan 2003

    Posts: 1,822

    I tried that in notepad and textpad. The problem is it doesnt appear to treat it as a special character so I just end up with \n in the text
     
  4. oneilldo

    Wise Guy

    Joined: 16 Jan 2003

    Posts: 1,822

    never mind I did it in word as I could replace the ', ' with a manual line break.
    mental block is over