Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Replace multiple spaces with single space?

  1. #1
    Join Date
    Apr 2007
    Posts
    2,010

    Default Replace multiple spaces with single space?

    Hi,

    Does anyone know how to do this in kettle?

    I tried this in a javascript step:

    PRODUCT_NAME = PRODUCT_NAME.replace(/\s+/g," ");

    but it gave this error:

    The choice of Java constructor replace matching JavaScript argument types (function,string) is ambiguous; candidate constructors are:
    class java.lang.String replace(java.lang.CharSequence,java.lang.CharSequence)
    class java.lang.String replace(char,char) (script#10)

    Whats the best way to do it?

    Thanks,
    Dan

  2. #2
    Join Date
    Apr 2007
    Posts
    2,010

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.