{"id":1513,"date":"2012-09-08T14:16:10","date_gmt":"2012-09-08T21:16:10","guid":{"rendered":"http:\/\/blog.brainlitter.com\/?p=1513"},"modified":"2012-09-08T14:16:10","modified_gmt":"2012-09-08T21:16:10","slug":"pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list","status":"publish","type":"post","link":"https:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/","title":{"rendered":"Pulling line breaks out of a giant text file and turning it into comma separated list"},"content":{"rendered":"<p>While there is probably a dozen ways to do this, I needed to today and I wanted to do it quick and easy. Figured this might help others, particularly if you were trying to take a big list of text entries and pull it into SharePoint for more meaningful data manipulation.<\/p>\n<h2>What<\/h2>\n<p>I wanted to take a giant list of Artists (that my band <a href=\"http:\/\/www.supersauce.ca\">www.supersauce.ca<\/a> covers) that I had already cleaned up for duplicates in Excel and turn it into a comma separated list that Facebook would accept.\u00a0 Your needs may vary, but the requirement occurs for me often enough.<\/p>\n<h2>So What<\/h2>\n<p>So I had a big list like this (over 200 actually) that I massaged first in Excel to remove duplicates (We do quite a number of Journey songs for example).\u00a0 This is just a sampling:<\/p>\n<p><span style=\"color: #c0504d\">4 Non Blondes<br \/>\nA Flock Of Seagulls<br \/>\nABBA<br \/>\nAce Of Base<br \/>\nAdele<br \/>\nAlabama Shakes<br \/>\nAWOLNATION<br \/>\nBachman Turner Overdrive<br \/>\nBadfinger<br \/>\nBahamas<br \/>\nBand Of Skulls<br \/>\nBig and Rich<br \/>\nBig Brother &amp; The Holding Company<br \/>\nBig Sugar<\/span><\/p>\n<p><strong><em>But I wanted it to be like this\u2026<\/em><\/strong><\/p>\n<p><span style=\"color: #c0504d\">4 Non Blondes, A Flock Of Seagulls, ABBA, Ace Of Base, Adele, Alabama Shakes, AWOLNATION, Bachman Turner Overdrive, Badfinger, Bahamas, Band Of Skulls, Big and Rich, Big Brother &amp; The Holding Company, Big Sugar,<\/span><\/p>\n<h2>Now What<\/h2>\n<p>My approach was to use <a href=\"http:\/\/notepad-plus-plus.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">NotePad++<\/a> (donation ware) and perform the following, which worked a treat.<\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li>Choose Search\u2026 Replace<\/li>\n<li>Search for:<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"\/wp-content\/uploads\/brainlitter\/2012\/09\/SNAGHTML19719d2e.png\"><img loading=\"lazy\" decoding=\"async\" style=\"padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px\" title=\"SNAGHTML19719d2e\" src=\"\/wp-content\/uploads\/brainlitter\/2012\/09\/SNAGHTML19719d2e_thumb.png\" alt=\"SNAGHTML19719d2e\" width=\"71\" height=\"55\" border=\"0\" \/><\/a><\/p>\n<ul>\n<li>Turn on Extended Search Mode<\/li>\n<li>Replace with: , (and a space)<\/li>\n<\/ul>\n<p>That did it, cut and paste into Facebook and on to the next thing in this Rock Star\u2019s life.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"\/wp-content\/uploads\/brainlitter\/2012\/09\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px\" title=\"image\" src=\"\/wp-content\/uploads\/brainlitter\/2012\/09\/image_thumb.png\" alt=\"image\" width=\"664\" height=\"507\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While there is probably a dozen ways to do this, I needed to today and I wanted to do it quick and easy. Figured this might help others, particularly if you were trying to take a big list of text entries and pull it into SharePoint for more meaningful data manipulation. What I wanted to &hellip; <a href=\"https:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/\"><\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[198,14],"tags":[707],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Pulling line breaks out of a giant text file and turning it into comma separated list - Brainlitter - Inside the mind of Sean Wallbridge<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pulling line breaks out of a giant text file and turning it into comma separated list - Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"og:description\" content=\"While there is probably a dozen ways to do this, I needed to today and I wanted to do it quick and easy. Figured this might help others, particularly if you were trying to take a big list of text entries and pull it into SharePoint for more meaningful data manipulation. What I wanted to &hellip;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/\" \/>\n<meta property=\"og:site_name\" content=\"Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"article:published_time\" content=\"2012-09-08T21:16:10+00:00\" \/>\n<meta name=\"author\" content=\"Sean Wallbridge\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sean Wallbridge\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/\",\"url\":\"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/\",\"name\":\"Pulling line breaks out of a giant text file and turning it into comma separated list - Brainlitter - Inside the mind of Sean Wallbridge\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\"},\"datePublished\":\"2012-09-08T21:16:10+00:00\",\"dateModified\":\"2012-09-08T21:16:10+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\"},\"breadcrumb\":{\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Brainlitter\",\"item\":\"https:\/\/regroove.ca\/brainlitter\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pulling line breaks out of a giant text file and turning it into comma separated list\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\",\"url\":\"https:\/\/regroove.ca\/brainlitter\/\",\"name\":\"Brainlitter - Inside the mind of Sean Wallbridge\",\"description\":\"Dad. Husband. Drummer. Learner of Things.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\",\"name\":\"Sean Wallbridge\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"caption\":\"Sean Wallbridge\"},\"url\":\"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pulling line breaks out of a giant text file and turning it into comma separated list - Brainlitter - Inside the mind of Sean Wallbridge","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/","og_locale":"en_US","og_type":"article","og_title":"Pulling line breaks out of a giant text file and turning it into comma separated list - Brainlitter - Inside the mind of Sean Wallbridge","og_description":"While there is probably a dozen ways to do this, I needed to today and I wanted to do it quick and easy. Figured this might help others, particularly if you were trying to take a big list of text entries and pull it into SharePoint for more meaningful data manipulation. What I wanted to &hellip;","og_url":"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/","og_site_name":"Brainlitter - Inside the mind of Sean Wallbridge","article_published_time":"2012-09-08T21:16:10+00:00","author":"Sean Wallbridge","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sean Wallbridge","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/","url":"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/","name":"Pulling line breaks out of a giant text file and turning it into comma separated list - Brainlitter - Inside the mind of Sean Wallbridge","isPartOf":{"@id":"https:\/\/regroove.ca\/brainlitter\/#website"},"datePublished":"2012-09-08T21:16:10+00:00","dateModified":"2012-09-08T21:16:10+00:00","author":{"@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77"},"breadcrumb":{"@id":"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/regroove.ca\/brainlitter\/2012\/09\/08\/pulling-line-breaks-out-of-a-giant-text-file-and-turning-it-into-comma-separated-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Brainlitter","item":"https:\/\/regroove.ca\/brainlitter\/"},{"@type":"ListItem","position":2,"name":"Pulling line breaks out of a giant text file and turning it into comma separated list"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/brainlitter\/#website","url":"https:\/\/regroove.ca\/brainlitter\/","name":"Brainlitter - Inside the mind of Sean Wallbridge","description":"Dad. Husband. Drummer. Learner of Things.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77","name":"Sean Wallbridge","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","caption":"Sean Wallbridge"},"url":"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/1513"}],"collection":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/comments?post=1513"}],"version-history":[{"count":0,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/1513\/revisions"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/media?parent=1513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/categories?post=1513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/tags?post=1513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}