Regex issue! not getting intended output

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

Appreciate your quick help on this.

Hello @tshaikh,

Try to use (?<=Scope and Approach)(.*?)(?=Scope Description) and let me know

Have you checked this post?

Best Regards,

Please check it in . It have errors. U need to remove first “)”. I guess.


I checked using (?<=Scope and Approach)(.*?)(?=Scope Description) and looked at Extract word between two known words 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)

Hi @tshaikh,

try this pattern

"(?<=" + beforelabel + ")(?s).*(?=" + afterlabel + ")"


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?

I’m able to get intended output on 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.