How to solve this Regex

Hi,
Can anyone please help me to fix the regex issue,
I’m sharing a sample pdf here, I want to find Regex for WORKERS ALLOTMENT ,
Here 2 workers allotments are there
WORKERS ALLOTMENT(212 HOURS)-25,200.00
WORKERS ALLOTMENT(123 HOURS)-27,200.00

I Want output as 25,200.00 and 27,200.00 and also 212 HOURS and 123 HOURS.
Pdf_Sample.pdf (56.8 KB)

HI @Chippy_Kolot

How about the regex

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=ALLOTMENT)(\(\d+\sHOURS\)\W)([\d.,]+)").Groups(2)

image

Regards
Gokul

Check out this topic already create by You : Regular expression issue - #6 by Gokul_Jayakumar

Regards
Gokul

HI,

Hope the following sample helps you.

 "\((?<HOURS>\d+)\s+HOURS\)\s+-\s+(?<PRICE>[\d,.]+)"

Sample20221003-3.zip (55.0 KB)

Regards,

212 HOURS and 123 HOURS are static,
1.WORKERS ALLOTMENT(212 HOURS)-25,200.00

1.(?<=WORKERS ALLOTMENT(212 HOURS)).* WILL GET OUTPUT AS 25,200
(?<=WORKERS ALLOTMENT).*(?=(\d,.)+)

Similar things i need to do for other one also,it should come in same work flow with seperate sequence.

Hi,

I need to create regex for both workers allotment in single workflow with seperate sequence

Hi,

Do you mean as the following?

Sample20221003-3v2.zip (55.5 KB)

Regards,

HI @Chippy_Kolot

Check out this topic created by you : How to create regex in same workflow

Regards
Gokul