# String.replace()

**URL:** https://forum.kirupa.com/t/string-replace/255113
**Category:** flash
**Created:** [March 19, 2008, 6:29am UTC](https://forum.kirupa.com/t/string-replace/255113 "2008-03-19T06:29:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![trundrumbalind](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trundrumbalind/32/696_2.png) [@trundrumbalind](https://forum.kirupa.com/u/trundrumbalind)
#### Post date: [March 19, 2008, 6:29am UTC](https://forum.kirupa.com/t/string-replace/255113/1 "2008-03-19T06:29:48Z")

</div>

Hi guys,  
Ok I have an input text field with htmlText set to false.  
Now, I want to grab data from the text field but I want to convert line breaks to “\<br /\>”. I used this code…

```auto
textDescription.text.replace("\r", "<br />");

```

Which works fine for the first line break but any breaks after that aren’t replaced. Any ideas?
