Hi all,
Could you pleas help me in Extracting the specific data from the test shown below.
D12345 First value (panoramic situation) – (limited to 1 D12345 or $0.00
D12345 every 10 years)
In this test I would like to Extract the Value in between the “()” which stars with Limit,Limited and ends with Month, months,year,years.
Could you please help me on this
Thanks
Sreenivasa
Here
ppr
(Peter Preuss)
June 21, 2022, 3:58pm
2
find a first Regex pattern
we had set the IgnoreCase regex option
Thanks for the solution, Here how can we pass this value to a variable.
I am trying with the group functions, but throwing an error.
Could you please help me on this
Thanks
Sreenviasa
ppr
(Peter Preuss)
June 21, 2022, 4:16pm
4
Assign Activity:
strText = System.Text.RegularExpressions.Regex.Match(yourInputTextVar, "(?<=\()LIMI[\s\S]*?(?=\))").Value
feel free to set also the pattern onto a variable like
strPattern = “(?<=()LIMI[\s\S]*?(?=))”
strText = System.Text.RegularExpressions.Regex.Match(yourInputTextVar, strPattern).Value
[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum
Thanks for the Reply,
I am facing this issue
I am unable to find what I did wrong. could you please help me on this
Thanks
ppr
(Peter Preuss)
June 21, 2022, 4:32pm
6
your are not providing a proper input string to the regex.Match.
Not knowing your details in all it looks like missmatching different approaches into one approach
Just checkout the CheatSheet and get some trainings on how to use when looking to the different samples
1 Like
Hi @ppr
Could you please look in to this,
This is not matching the condition
ppr
(Peter Preuss)
June 21, 2022, 4:57pm
8
check first that CaseIgnore option is enabled also unescape the ( e.g \(
when used within the pattern
Hi @ppr
Yes its enabled but still same error
Thanks
ppr
(Peter Preuss)
June 21, 2022, 5:01pm
10
please check
would recommend to check in
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET, Rust.
Hi!
Have you imported the namespaces from import panel?
If not follow the below steps:
Open UiPath studio
open your project
Below next to the argument panel you can see the import panel click on that And search for System.Text.RegularExpression
Your Expression would be
Assign strText = System.Text.RegularExpressions.Regex.Match(yourInputTextVar, "(?<=\()LIMI[\s\S]*?(?=\))").ToString
Regards,
NaNi
Thanks For your reply tarun,
I Had imported the namespaces, but unable to extract the required value. please see the below image
Did I missing any thing ?
I want the text in between the “()” starting with the Limi or limited and ends with Year, years, month, months
Thanks
Sreenivasa
ushu
(Usha kiranmai)
June 22, 2022, 6:39am
13
@srinusoft37 Try below attached workflow
Example.zip (2.9 KB)
Input
Output
1 Like
Hi!
Try this out:
System.Text.RegularExpressions.Regex.Match(TextValue,"(?=Limit|limit|limited|Limited to ).*[\n\r]+.*(?<=Month| month|Months|months|year|Year|years|Years)").ToString
Reference:
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
Regards,
NaNi
system
(system)
Closed
June 25, 2022, 6:50am
15
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.