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!

1 ACCEPTED SOLUTION

Accepted Solutions
Seven Stars

Re: Searching a string and extract values

Please mark the post as resolved so that others can use
7 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.
Seven Stars

Re: Searching a string and extract values

Please mark the post as resolved so that others can use