Searching a string and extract values

Highlighted
Four Stars

Searching a string and extract values

HI,

I have a use case where I have to search for a string "INC TYPE" and extract the values after the particular string.The string can be anywhere in the description. Please find example 

complete desc:

Simulation INC TYPE 566-A8970

ABN Cor INC TYPE 768-B5679

INC TYPE 897-B6789

Operations building INC TYPE 225-T5679 Legal 

 

My expected output:

566-A8970

768-B5679

897-B6789

225-T5679

 

Please suggest. Thanks for your help!


Accepted Solutions
Eight Stars

Re: Searching a string and extract values

Please mark the post as resolved so that others can use

All Replies
Moderator

Re: Searching a string and extract values

Have you tried using tExtractRegexFields?

Nine Stars

Re: Searching a string and extract values

Are you looking for below output?

IncType.PNGIncType1.PNG

Regards,

Veeru Boppudi
Four Stars

Re: Searching a string and extract values

Thanks Veera!
Yes that was my expected output.
Four Stars

Re: Searching a string and extract values

Hi, I shall try and update you. Thanks for your response!
Ten Stars

Re: Searching a string and extract values

Should you wish to use tExtractRegexFields, this pattern should yield the result you're looking for:

"INC TYPE (\\d{3}-[A-Z0-9]{5})"
Four Stars

Re: Searching a string and extract values

Thank you all. It is resolved now.
Eight Stars

Re: Searching a string and extract values

Please mark the post as resolved so that others can use

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads