<Ultra Urgent> Extracting excel values as per requirement:

Step1: I want to extract corresponding hour’s job name from this table containing only F110 - BDA as job name (not others like FI__01H and all) for e.g. P.S> this job name(F110-20220601-BDA01) has pattern as date(20220601) and hour as BDA01(01 for hour) like this.
For e.g. this F110 BDA job is also varying w.r.t date and execution hour as described below:
Execution at 2nd June 12 PM >> “F110- 20220602 -BDA 12 ” this I want to retrieve
Execution at 1st may 3 PM >> “F110- 20220501 -BDA 15 ” this I want to retrieve

Step2: Also, retrieve corresponding status of same job retrieved in step 1 e.g. finished or something. and save that status in assign variable.

image

maybe we did not understand on first shot. Did you try filter datatable activity with the startswith condition set to F110?

for a more detailed parsing we can check for Regex:
grafik
Refering to groups:
grafik

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

It’s like I want to extract jobs having F110 - BDA as it’s content.
Then I want to further retrieve it’s status. Hope it clears?

give a try on filter and regex parsing. Let us know if it was working, Thanks

HI This is extracting F110*BDA jobs but not for that system hour?. Further I want to extract the status of the same? Could u plz help on same?

not if I got your right. Have a look here:
grafik

 strText
 "F110-20220601-BDA01"
 strPattern
 "(.*)-(\d+)-(.*?)(\d+)"
 myMatch = regex.Match(strText,strPattern)
 [F110-20220601-BDA01]
 myMatch.Groups(2)
 [20220601]
 myMatch.Groups(1)
 [F110]
 myMatch.Groups(3)
 [BDA]
 myMatch.Groups(4)
 [01]

when refering to the groups, we extracted the different portions.

Maybe you can share some more samples with when more variations are to handle. Thanks

2nd June 12 PM >> “F110-20220602-BDA12

1st may 3 PM >> “F110-20220501-BDA15

samples

Varying data in highlighted

@anjasing
Try -

"Look-Up Data table " activity.

grafik

In case you need further help please elaborate in detail on what is needed. Thanks

Hi, @ppr , I’ve again updated the description. Please go through it again and help if possible. That will be really helpful

about retrieval the different parts same a shown above. I just modifed the pattern on a more defensive handling the variations

grafik
grafik
(.*?)-.*?(\d+).*?-.*?([A-Z]+).*?(\d+)

Also find an example for an active selection for a particular date and hour:
grafik

Hi Can’t I convert it into variable like this to get the pattern :

outputFinal =
System.Text.RegularExpressions.Regex.Match(extractDTString.ToString,"(.?)-.?("+todDate+").?-.?([A-Z]+).*?("+ExecutionHour+")").ToString

where
todDate = DateTime.Now.tostring(“yyyyMMdd”)
ExecutionHour=Cint(DateTime.Now.tostring(“hh”))

but it’s giving issue:

image