tshaikh
(Tabrez Shaikh)
October 15, 2018, 4:05pm
1
Is there any issue with below “(?s)(?<=Scope and Approach\n).*?(?=Scope Description\n)” matches in UiPath
I’m trying to get anything between “Scope and Approach” and “Scope Description”
I’m getting intended output on regex101.com
Appreciate your quick help on this.
Susana
(Susana González Cacheiro)
October 15, 2018, 4:08pm
2
Hello @tshaikh ,
Try to use (?<=Scope and Approach)(.*?)(?=Scope Description) and let me know
Have you checked this post?
Hii
Thanks for quick reply.
I’m sorry as I’m new to regex but where exactly would I use this expression in UiPath?
I mean if I have a variable which holds the string and another one which holds the substring, how will i assign the result of this regex to the substring variable?
Best Regards,
Susana
Please check it in https://regexr.com/ . It have errors. U need to remove first “)”. I guess.
tshaikh
(Tabrez Shaikh)
October 16, 2018, 3:04am
4
Hi,
I checked using (?<=Scope and Approach)(.*?)(?=Scope Description) and looked at Extract word between two known words - #3 by qwerty123 as well but seems it is not working
Enclosing content document and also xaml file for your reference.
rfp-scope-ui.xaml (6.8 KB)
LWSystems-UI.pdf (59.5 KB)
arivu96
(Arivazhagan A)
October 16, 2018, 5:46am
5
Hi @tshaikh ,
try this pattern
"(?<=" + beforelabel + ")(?s).*(?=" + afterlabel + ")"
Regards,
Arivu
tshaikh
(Tabrez Shaikh)
October 16, 2018, 6:49pm
6
Hi arivu,
I tried but still not getting the output. Have you looked at my xaml and pdf file? Is it possible to check your expression on my xaml and update please?
tshaikh
(Tabrez Shaikh)
October 16, 2018, 6:51pm
7
I’m able to get intended output on regex101.com using this:
(?<=Scope and Approach\n)(?s)(.*?)(?=Scope Description)
But not able to get it work using matches in Studio
Use (Scope and Approach).*(Scope Description)
And replace Scope and approach, Scope description with blank.