mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
Improve bad regex msg when doing Find/count - thx Janusz :)
This commit is contained in:
parent
d92cd06b00
commit
e2b17ff4b3
@ -414,7 +414,17 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
{
|
||||
if (FindReplaceType.FindType == FindType.RegEx)
|
||||
{
|
||||
count += _regEx.Matches(p.Text).Count;
|
||||
try
|
||||
{
|
||||
count += _regEx.Matches(p.Text).Count;
|
||||
}
|
||||
catch (RegexMatchTimeoutException exception)
|
||||
{
|
||||
MessageBox.Show(exception.Message + Environment.NewLine +
|
||||
Environment.NewLine +
|
||||
"Input: " + exception.Input);
|
||||
return count;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user