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
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.