{"id":7573,"date":"2022-04-29T13:39:20","date_gmt":"2022-04-29T18:39:20","guid":{"rendered":"https:\/\/www.blackgate.net\/blog\/?p=7573"},"modified":"2022-04-29T13:39:54","modified_gmt":"2022-04-29T18:39:54","slug":"trimming-trailing-spaces-in-libreoffice-calc","status":"publish","type":"post","link":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/","title":{"rendered":"Trimming trailing spaces in LibreOffice Calc"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I looked for ages before I found this advice, so I am preserving it here. Credit goes to <a href=\"https:\/\/keyboardplaying.org\/blog\/2020\/09\/trim-trailing-spaces-ms-word-libreoffice\/\">Keyboard Playing for the original post<\/a>, though.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In LibreOffice Writer, you can replace <code>\\s+(\\r?(\\n|$))<\/code> with <code>$1<\/code> to remove all trailing spaces. A single execution should be efficient this time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The regular expression (aka &#8220;regex&#8221;) can be decomposed this way:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\\s+<\/code> matches one or more whitespaces;<br><code>(\\r?(\\n|$))<\/code> matches a carriage return <code>(\\r?\\n)<\/code> or the end of a paragraph <code>(\\r?$)<\/code> ; <code>\\r?<\/code> is there only to be compatible with Windows carriage return format;<br><code>$1<\/code> is the first captured group <code>((\\r?(\\n|$)))<\/code> as it was found in the text (we put back what was found).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I looked for ages before I found this advice, so I am preserving it here. Credit goes to Keyboard Playing for the original post, though. In LibreOffice Writer, you can replace \\s+(\\r?(\\n|$)) with $1 to remove all trailing spaces. A single execution should be efficient this time. The regular expression (aka &#8220;regex&#8221;) can be decomposed [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,39],"tags":[],"class_list":["post-7573","post","type-post","status-publish","format-standard","hentry","category-software","category-windows"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Trimming trailing spaces in LibreOffice Calc - Blackmoor Vituperative<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Trimming trailing spaces in LibreOffice Calc - Blackmoor Vituperative\" \/>\n<meta property=\"og:description\" content=\"I looked for ages before I found this advice, so I am preserving it here. Credit goes to Keyboard Playing for the original post, though. In LibreOffice Writer, you can replace s+(r?(n|$)) with $1 to remove all trailing spaces. A single execution should be efficient this time. The regular expression (aka &#8220;regex&#8221;) can be decomposed [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/\" \/>\n<meta property=\"og:site_name\" content=\"Blackmoor Vituperative\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bblackmoor\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/bblackmoor\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-29T18:39:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-29T18:39:54+00:00\" \/>\n<meta name=\"author\" content=\"bblackmoor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/bblackmoor_\" \/>\n<meta name=\"twitter:site\" content=\"@bblackmoor_\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"bblackmoor\" \/>\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\":\"Article\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/trimming-trailing-spaces-in-libreoffice-calc\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/trimming-trailing-spaces-in-libreoffice-calc\\\/\"},\"author\":{\"name\":\"bblackmoor\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#\\\/schema\\\/person\\\/bb04cdbf863652f366c64e81805d6c4f\"},\"headline\":\"Trimming trailing spaces in LibreOffice Calc\",\"datePublished\":\"2022-04-29T18:39:20+00:00\",\"dateModified\":\"2022-04-29T18:39:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/trimming-trailing-spaces-in-libreoffice-calc\\\/\"},\"wordCount\":105,\"publisher\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#\\\/schema\\\/person\\\/bb04cdbf863652f366c64e81805d6c4f\"},\"articleSection\":[\"Software\",\"Windows\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/trimming-trailing-spaces-in-libreoffice-calc\\\/\",\"url\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/trimming-trailing-spaces-in-libreoffice-calc\\\/\",\"name\":\"Trimming trailing spaces in LibreOffice Calc - Blackmoor Vituperative\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#website\"},\"datePublished\":\"2022-04-29T18:39:20+00:00\",\"dateModified\":\"2022-04-29T18:39:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/trimming-trailing-spaces-in-libreoffice-calc\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/trimming-trailing-spaces-in-libreoffice-calc\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/trimming-trailing-spaces-in-libreoffice-calc\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Trimming trailing spaces in LibreOffice Calc\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/\",\"name\":\"Blackmoor Vituperative\",\"description\":\"But in the end it&#039;s only a passing thing, this shadow; even darkness must pass.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#\\\/schema\\\/person\\\/bb04cdbf863652f366c64e81805d6c4f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#\\\/schema\\\/person\\\/bb04cdbf863652f366c64e81805d6c4f\",\"name\":\"bblackmoor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg_sigil_lg.png\",\"url\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg_sigil_lg.png\",\"contentUrl\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg_sigil_lg.png\",\"width\":900,\"height\":900,\"caption\":\"bblackmoor\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg_sigil_lg.png\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/bblackmoor\",\"https:\\\/\\\/www.instagram.com\\\/bsblackmoor\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/bblackmoor_\"],\"url\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/author\\\/bblackmoor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Trimming trailing spaces in LibreOffice Calc - Blackmoor Vituperative","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":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/","og_locale":"en_US","og_type":"article","og_title":"Trimming trailing spaces in LibreOffice Calc - Blackmoor Vituperative","og_description":"I looked for ages before I found this advice, so I am preserving it here. Credit goes to Keyboard Playing for the original post, though. In LibreOffice Writer, you can replace s+(r?(n|$)) with $1 to remove all trailing spaces. A single execution should be efficient this time. The regular expression (aka &#8220;regex&#8221;) can be decomposed [&hellip;]","og_url":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/","og_site_name":"Blackmoor Vituperative","article_publisher":"https:\/\/www.facebook.com\/bblackmoor","article_author":"https:\/\/www.facebook.com\/bblackmoor","article_published_time":"2022-04-29T18:39:20+00:00","article_modified_time":"2022-04-29T18:39:54+00:00","author":"bblackmoor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/bblackmoor_","twitter_site":"@bblackmoor_","twitter_misc":{"Written by":"bblackmoor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/#article","isPartOf":{"@id":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/"},"author":{"name":"bblackmoor","@id":"https:\/\/www.blackgate.net\/blog\/#\/schema\/person\/bb04cdbf863652f366c64e81805d6c4f"},"headline":"Trimming trailing spaces in LibreOffice Calc","datePublished":"2022-04-29T18:39:20+00:00","dateModified":"2022-04-29T18:39:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/"},"wordCount":105,"publisher":{"@id":"https:\/\/www.blackgate.net\/blog\/#\/schema\/person\/bb04cdbf863652f366c64e81805d6c4f"},"articleSection":["Software","Windows"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/","url":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/","name":"Trimming trailing spaces in LibreOffice Calc - Blackmoor Vituperative","isPartOf":{"@id":"https:\/\/www.blackgate.net\/blog\/#website"},"datePublished":"2022-04-29T18:39:20+00:00","dateModified":"2022-04-29T18:39:54+00:00","breadcrumb":{"@id":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.blackgate.net\/blog\/trimming-trailing-spaces-in-libreoffice-calc\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.blackgate.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Trimming trailing spaces in LibreOffice Calc"}]},{"@type":"WebSite","@id":"https:\/\/www.blackgate.net\/blog\/#website","url":"https:\/\/www.blackgate.net\/blog\/","name":"Blackmoor Vituperative","description":"But in the end it&#039;s only a passing thing, this shadow; even darkness must pass.","publisher":{"@id":"https:\/\/www.blackgate.net\/blog\/#\/schema\/person\/bb04cdbf863652f366c64e81805d6c4f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.blackgate.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.blackgate.net\/blog\/#\/schema\/person\/bb04cdbf863652f366c64e81805d6c4f","name":"bblackmoor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.blackgate.net\/blog\/wp-content\/uploads\/2022\/06\/bg_sigil_lg.png","url":"https:\/\/www.blackgate.net\/blog\/wp-content\/uploads\/2022\/06\/bg_sigil_lg.png","contentUrl":"https:\/\/www.blackgate.net\/blog\/wp-content\/uploads\/2022\/06\/bg_sigil_lg.png","width":900,"height":900,"caption":"bblackmoor"},"logo":{"@id":"https:\/\/www.blackgate.net\/blog\/wp-content\/uploads\/2022\/06\/bg_sigil_lg.png"},"sameAs":["https:\/\/www.facebook.com\/bblackmoor","https:\/\/www.instagram.com\/bsblackmoor\/","https:\/\/x.com\/https:\/\/twitter.com\/bblackmoor_"],"url":"https:\/\/www.blackgate.net\/blog\/author\/bblackmoor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/posts\/7573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/comments?post=7573"}],"version-history":[{"count":2,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/posts\/7573\/revisions"}],"predecessor-version":[{"id":7575,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/posts\/7573\/revisions\/7575"}],"wp:attachment":[{"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/media?parent=7573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/categories?post=7573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/tags?post=7573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}