Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Replacing Enter Key from input

  1. #1
    Join Date
    Feb 2009

    Default Replacing Enter Key from input

    I have an Excel input file that, in some cells, has an enter key. When I pass this flow of data into a plain text file, this enter key in the cell acts as a delimiter and throws data to the wrong fields. I'm trying to use a modified javascript step to replace the enter key, but so far I haven't been able. Has anyone else faced this problem?? I'll appreciate the help.
    Rafael Soto Wilde
    Business Inteligence Consultant

  2. #2
    Join Date
    Nov 1999


    Has anyone else faced this problem??
    It has come up on quite a few occasions on this very forum.
    There is a step now called "Replace in String" that you can use.
    The regular expression for \n is \\n of course.
    Since in JavaScript you need to escape backslashes it becomes :

    var newString = replace(oldString, "\\\\n", "")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.