 In this program, we are going to see how we can find a text by using regex. I am having one PDF file here and it is containing some phone numbers. You will see here, one here, one here, here in the tables and one in the bottom. So basically we are going to have one regex, here it is for the phone numbers and we will see whether we are able to extract all the phone numbers or not. And let me copy it again, copy and paste here, copy always. So our game plan is, first we create the instance of the text extractor, we are going to load the document, we are enabling the regex search, we are waiting through all the pages until we find out and once we find the text, we will display it, so very simple. So let's get started, so I am going to have the one instance of the text extractor and we are passing the traces and key and name here. Let's load the document, load document.fromFile and name is sampleprogram3.pdf. Now enable regex, regex search equal to true. Let us iterate through all the pages, extractor.getPageCount and increment it. Let us see, we are able to find it if extractor.find, we are giving the page index, instead of text we are going to give the regex here and it is gain sensitive and do it until we found everything. So extractor.findNext and let us display everything we found here for each and we are going to have the search result element here, extractor.foundTex.Elements and let us display console.WriteLine and element.Text. Let's see what's output and here it is. So we are able to get all the found numbers by using regex inside the PDF.