Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

copy and pasting new lines

  • 15-10-2015 02:54PM
    #1
    Closed Accounts Posts: 3,419 ✭✭✭


    Hi,
    Can I replace certain characters with themselves and a newline ?

    I didn;t know JSON cares about new lines and have a txt file 10000s of lines long that needs to be in JSON format ... pain in the ass...

    \n doesn;t work it just copies "\n" ..


Comments

  • Registered Users, Registered Users 2 Posts: 3,740 ✭✭✭johnmcdnl


    Hi,
    Can I replace certain characters with themselves and a newline ?

    I didn;t know JSON cares about new lines and have a txt file 10000s of lines long that needs to be in JSON format ... pain in the ass...

    \n doesn;t work it just copies "\n" ..

    Use Notepad++
    Ctrl+F should open a search box, switch into the "Replace" tab and enter the terms you want to replace (including your \n for the newlines)

    It'll probably take a bit of playing around but something like this basically.

    365604.png


  • Registered Users, Registered Users 2 Posts: 11,094 ✭✭✭✭28064212


    I didn;t know JSON cares about new lines..
    It doesn't :confused:

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



  • Registered Users, Registered Users 2 Posts: 1,275 ✭✭✭bpmurray


    Hi,
    Can I replace certain characters with themselves and a newline ?

    I didn;t know JSON cares about new lines and have a txt file 10000s of lines long that needs to be in JSON format ... pain in the ass...

    \n doesn;t work it just copies "\n" ..

    If it has 10s of thousands of lines, why do you need to add more? JSON certainly doesn't need them!


Advertisement