# Trim trailing characters

**URL:** <https://forums.powershell.org/t/trim-trailing-characters/16153>\
**Category:** PowerShell Help\
**Created:** [April 2, 2021, 5:22pm UTC](https://forums.powershell.org/t/trim-trailing-characters/16153 "2021-04-02T17:22:05Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [April 2, 2021, 6:13pm UTC](https://forums.powershell.org/t/trim-trailing-characters/16153/5 "2021-04-02T18:13:41Z")

</div>

Please,  
When you post code, error messages, sample data or console output format it as code, please.

Here you can read how that works: Guide to Posting Code.

> [@Guide to Posting Code - Redux](https://forums.powershell.org/t/guide-to-posting-code-redux/15797):
>
> Discourse uses [Markdown](https://www.markdownguide.org/getting-started/) for text formatting. There is a reference sheet and quick tutorial here: [Markdown Reference](https://commonmark.org/help/) You can produce in-line code formatting by wrapping your code in backticks (`). For example, `Get-ChildItem` produces Get-ChildItem. For larger code blocks, place a line containing three backticks above and below your code. For example ``` # 256-Color Foreground & Background Charts echo “`n$esc[1;4m256-Color Foreground & Background Charts$esc[0m” foreach ($fgbg in 38,48) { #…

You can go back and edit your existing post. You don’t have to create a new one. 😉

Thanks in advance.

---

_[View the full topic](https://forums.powershell.org/t/trim-trailing-characters/16153)._
