# Remove hard return from string?

**URL:** https://forum.kirupa.com/t/remove-hard-return-from-string/70883
**Category:** Uncategorized
**Created:** [November 18, 2004, 4:34pm UTC](https://forum.kirupa.com/t/remove-hard-return-from-string/70883 "2004-11-18T16:34:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ananta](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Ananta](https://forum.kirupa.com/u/Ananta)
#### Post date: [November 18, 2004, 4:34pm UTC](https://forum.kirupa.com/t/remove-hard-return-from-string/70883/1 "2004-11-18T16:34:05Z")

</div>

Hello,

I have a multiline textfield were users can type text. I split the text in words so I can compair them to see if they are a certain word. Some words don’t pass the if statment even if they are the same (at leased to me). I found out it’s because these words have a hard return in front of them. I need to remove the hard return, but I can’t find out how. I tried to split the string on "  
", but that doesn’t work. I’m used to Java so maybe I look at this problem the wrong way. I hope someone can help me with this.

Thanks,  
:book: Ananta
