Extraction via Regular Expression

Dears,

I Have the below text file, and it will be always fixed, how can i extract the details via Regular expression?

Contract Duration=2 years
Minimum Acceptable Technical Scoring=70%
Is there previous contract=NO
Contract Number=
Project Name in Arabic=??? ??? ??? ??? ???
Proposed Start Date (DD-MON-YYYY)=01/01/2023
Proposed End Date (DD-MON-YYYY)=31/12/2024
Payment terms=Others
Feasibility Study if Above 1M AED=NO

Hey!

What do you wants to extract from the above mentioned text?

Regards,
NaNi

Hi @THIRU_NANI All data after =

Hey!

Try this:

Assign strContractDuration = System.Text.RegularExpressions.RegEx.Match(strInputVariable,"(?<=Contract Duration=).+").ToSTRING

Just change the Contract Duration You’ll get the each item.

Reference:

I used separator (Pipeline).

Regards,
NaNi

Hello @mosa_sleeman

To get the info you can use the below Regex :
System.Text.RegularExpressions.RegEx.Match(strInputVariable,(?<=\=)(.*)).Value.ToString

image

Regards,
Rohith

Or we can use Split as well

Try like this:

Assign strData1 = strInputVariable.Split("=",C)(1)

The above expression will give you the first data

Regards,
NaNi

you can setup a generic retrival (assumption = is always present) like
grafik
And refer to the groups:


group1 ~ key / info
group2 ~ value

Thanks all

1 Like

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