LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  replace special characters

    Employee
    Posted 03-14-2016 14:12

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: CarCrazyAl

    Hello all -
    I am quite new to LAE and am attempting to work through some tutorials / samples. I am somewhat stuck on how to replace special characters (TAB) with something else. I have a single CSV Input File with 7 fields. All these fields are STRING in the CSV's Out Pin. One of the fields, named "SUITE" contains either values or a pair of tabs (\t\t). I want to replace these with some text, like "Unknown".

    Using a Filter Node, I have tried if(suite.strlen() < 1 then {"Unknown"} else suite) which broke. I want to write something like {if SUITE = \t\t then "unknown"}.
    Can anyone help guide me to a solution?

    Thank you!


  • 2.  RE: replace special characters

    Employee
    Posted 03-14-2016 14:38

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    s=Suite.replace("\t\t","Unknown")
    emit s as Suite