Specific regexes crash program when using TextSearch

14 views
Skip to first unread message

Derek Baker

unread,
May 8, 2017, 5:51:01 PM5/8/17
to PDFTron PDFNet SDK
When I target strings such as:
648.1-9999-110.700/2002

with a regex such as:
"\\s{1}\\d{3}[.]\\d{1}[-]\\d{4}[-]\\d{3}[.]\\d{3}[/]"
or
"\\s{1}\\d{3}[.]\\d{1}[-]\\d{4}[-]\\d{3}[.]\\d{3}."

I get a 'cannot open file exception.'

If I remove [/] or the '.' from the regexes above, the substring up to the '/' is found and the program doesn't crash.

I'm writing in C# (on .NET obviously)

Is this a common issue?

Ryan

unread,
May 10, 2017, 8:19:29 PM5/10/17
to PDFTron PDFNet SDK
Is the issue document specific? Or occurs with any document?
Do you get a crash, or just the "cannot open file" exception?
Can you reproduce using our TextSearch sample?
Please post code, or modified TextSearchTest file, and if needed the input PDF file.
Reply all
Reply to author
Forward
0 new messages