Regexp for get string between 2 topics

Hello,

I am using Regex.Match(dataText,“(?<=heading1)(.*\n)+(?=heading2)”).ToString.Trim
this is working fine for me … but in my pdf right side i have text… left side images, so when i am extracting the text there is small text in between the images that is also bining in my excel,. so i dont want that… i need only the text whatever there in the right side…

so how can i remove that one…

Please help me out…

Thanks,
Suresh.

Hi
If possible can I have a view on thattext with a screenshot

Cheers @suresh_kumar4

1 Like

image

so the text in blue color also binding to the excel… i do want that… i need the text whatever there in the right side of the screen…

Thanks,
Suresh

If that is common text we can use REPLACE method like this
Your Regex expression.ToString.Replace(“that text”,””)

Cheers @suresh_kumar4

1 Like

Undestood, but in my pdf 200 pages so i am looping it in for each so the text is changing in each page…
so i how can i use this expresssion… Your Regex expression.ToString.Replace(“that text”,””)

is there any way to extract the text only right side using width wike that…

Thanks,

need the text inside the green box only.

Hi @suresh_kumar4

Try this with an assign activity.

System.Text.RegularExpressions.Regex.Match(input, "FirstString (.+?) SecondString ").Groups(1).Value