Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in RPA by (12.8k 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?


1 Answer

0 votes
by (29.8k 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
0 votes
1 answer
asked Jul 22, 2019 in RPA by noah kapoor (5.3k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94k users

Browse Categories