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.  Trim Fields - Regular Expressions

    Employee
    Posted 01-29-2015 04:13

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

    Originally posted by: Leaner

    Is it possible to use the Trim Fields node to trim regular expressions? I need to remove \r\n particularly.

    I've been using this very helpful tip, but this is field by field. I've got a huge amount of columns to go through and it is unclear which ones are dirty.

    Thanks


  • 2.  RE: Trim Fields - Regular Expressions

    Employee
    Posted 01-29-2015 06:37

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

    Originally posted by: ejones

    Are you asking that you have a large number of columns that need to be cleaned with a regular expression, and the concern is that writing the code for each and every column will take a large amount of time?

    If so, you could use LAE to automatically generate the BRAINscript code for columns. You do this by using the "lal1:Get Metadata" node to get a list of the columns. You could then use a filter node or manually identify the specific columns that need to be processed. Then another filter node to automatically write the BRAINscript code required for each node. Once this is done and executed, you copy and paste the new code into a filter node to run directly on the input data. And disable the nodes used to create the BRAINscript but keep them in case you need to regenerate the code.