This is a migrated thread and some comments may be shown as answers.

Is there a way to use Regex in search?

2 Answers 117 Views
PdfViewer and PdfViewerNavigator
This is a migrated thread and some comments may be shown as answers.
Bekir
Top achievements
Rank 1
Iron
Bekir asked on 27 Mar 2016, 06:28 PM

Hello,

I want to use Regex in search term. PDF files have some accented characters (like a > â) . And the search results do not give the desired result. Is there a way to use Regex in search?

Best regards...

2 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Mar 2016, 12:20 PM
Hello ,

Thank you for writing.

You can search by a Regex by setting the TextSearchOptions.UseRegularExpression property to true. Thus, the Find /FindPrevious method will treat the text as a regular expression:
Telerik.Windows.Pdf.Documents.Fixed.Search.TextSearchOptions options = new TextSearchOptions();
options.UseRegularExpression = true;
string pattern = "[aâ]";
SearchResult result = this.radPdfViewer1.PdfViewerElement.FindPrevious(pattern, options);

I hope this information helps. Should you have further questions I would be glad to help.

 Regards,
Dess
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Bekir
Top achievements
Rank 1
Iron
answered on 28 Mar 2016, 02:21 PM

Hello Dess,

Thank you very much for your interest. This is what I need.

Regards...

Tags
PdfViewer and PdfViewerNavigator
Asked by
Bekir
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Bekir
Top achievements
Rank 1
Iron
Share this question
or