Regex Based Extractor - Extraction Section from Invoice

Hi Community,

I have the detail as below and would like to extract section detail from the below:
Sample 1 )U Location XX Sub Sub Section Name CTS1 NEW Date 25 SEP 2021
Sample 2 )EVJeee Section NUDI Price Reference
Sample 3 )Activity Section JU81 Price Reference
Sample 4 )Section Name JEG9 Price Reference

Result Wanted (activity)
Sample 1 ) CTS1
Sample 2 ) NUDI
Sample 3 ) JU81
Sample 4 ) JEG9

May i know how to extract this kind of format detail if we have four scenarios?

Many thanks in advance.

Thank you.
Acitivty.txt (425 Bytes)

HI @SH_94

Here is the regex try this

(?<=Section Name )(\S+)|(?<=Section )(\S+)(?=\s{4})

Regards
Sudharsan

1 Like

Hi @Sudharsan_Ka

Many thanks for the help again

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.