- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to remove a carriage return from a field
allen_edmondson
Explorer
07-11-2013
12:23 PM
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

lguinn2
Legend
07-11-2013
03:43 PM
This should replace all carriage returns or linefeeds with a space in a field named myField:
yoursearchhere
| eval myField = replace (myField, "[\n\r]"," ")
| morestuffhere
If your data is from Windows and has CRLF in it, this will replace the CRLF with two spaces.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
grijhwani
Motivator
07-11-2013
04:45 PM
A refinement would be to make the regex "[\n\r]+" which would see one or more carriage returns or line feeds (or any combination thereof) with a single space.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
asimagu
Builder
07-11-2013
02:00 PM
do you have more than one carriage return in the field value??
