Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (12.7k points)

I have some text taken from a pdf file and read into a string. I want to extract the words before line 4 Description of the property being purchased and not anything above it or the underscore line below it. I tried using the regex /^[^4]*/ but this is returning null.

What would be a suitable regex to achieve the above?

Thanks.

1 Answer

0 votes
by (29.5k points)
I think your regex is fine just a minor change and it will start working

try using  this:

Regex regex = new Regex("^[^4]*"); //
 //Regex regex = new Regex("/^[^4]*/"); <--NOT THIS

Related questions

0 votes
1 answer
asked Jul 19, 2019 in RPA by noah kapoor (5.3k points)
0 votes
1 answer
asked Jul 22, 2019 in RPA by noah kapoor (5.3k points)
0 votes
1 answer
0 votes
1 answer
asked Jul 10, 2019 in RPA by Abhishek_31 (12.7k points)

Browse Categories

...