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.  How to find specific words from a column.

    Employee
    Posted 04-10-2018 09:49

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

    Originally posted by: Jagdev

    Hi Experts,

    Is there a way around to find specific list of words from each cell of the column and split it. I am away of regixismatch(). The issue is I have more than 470 words to compare with each cell of the column. Also, regix code is picking words which are available within other text in a cell.

    Ex word to find � one
    Text is � None

    It should not pick None in this case.

    Regards,
    Jagdev


  • 2.  RE: How to find specific words from a column.

    Employee
    Posted 04-11-2018 21:20

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

    Originally posted by: Jagdev

    Hi Experts,

    Any views on the above concern.

    Regards,
    JD


  • 3.  RE: How to find specific words from a column.

    Employee
    Posted 04-12-2018 03:58

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

    Originally posted by: awilliams1024

    To match a word with a regular expression you will need to ensure your pattern includes the 'anchor' for the beginning of a word or the end of a word \\b
    So, to match the word "one" your pattern would need to be "\\bone\\b"

    To match multiple words you can use alternation or you can construct a pattern that includes each word separated by the regular expression OR operator |

    The attached data flow shows how you can join your list of words into a delimited string so they can be used in the matching process. It then goes on to provide some use cases:

    1. a use case of using alternation to match multiple words (in the top Filter node on the right hand side). The output simply provides a Boolean field that indicates whether any of the words in the word list were matched in the input data.
    2. a use case that extends the above to also provide a delimited list of the words that were matched in each record (middle Filter node).
    3. a use case that further extends the above to replace each of the matched words with a single delimiter character (in this case "�"). The results string is then split into multiple columns using the 'Split Field by Delimiters' node (bottom Filter node etc).

    You may also want to review this thread which discusses some alternative ways of splitting a string into multiple columns:
    http://community.lavastorm.com/threa...-Columns-ouput

    Depending on your ultimate objective, you may want to consider whether it is absolutely necessary to split the data into multiple columns to achieve your aim. This is an 'expensive' operation to perform and you may end up with a lot of columns with a significant number of NULL values.

    Regex_Match_Multiple_Words.brg

    Regards,
    Adrian


  • 4.  RE: How to find specific words from a column.

    Employee
    Posted 04-20-2018 07:23

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

    Originally posted by: Jagdev

    Hi Adrian,

    Thanks for the above thread. It is really working fine.

    Regards,
    Jagdev