Set readonly modifier for subrip time code regex

This commit is contained in:
ivandroly 2015-06-28 06:57:28 +00:00
parent 3a7dad98b9
commit 9256ee4f37

View File

@ -23,8 +23,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
private Paragraph _paragraph;
private Paragraph _lastParagraph;
private ExpectingLine _expecting = ExpectingLine.Number;
private static Regex _regexTimeCodes = new Regex(@"^-?\d+:-?\d+:-?\d+[:,]-?\d+\s*-->\s*-?\d+:-?\d+:-?\d+[:,]-?\d+$", RegexOptions.Compiled);
private static Regex _regexTimeCodes2 = new Regex(@"^\d+:\d+:\d+,\d+\s*-->\s*\d+:\d+:\d+,\d+$", RegexOptions.Compiled);
private static readonly Regex _regexTimeCodes = new Regex(@"^-?\d+:-?\d+:-?\d+[:,]-?\d+\s*-->\s*-?\d+:-?\d+:-?\d+[:,]-?\d+$", RegexOptions.Compiled);
private static readonly Regex _regexTimeCodes2 = new Regex(@"^\d+:\d+:\d+,\d+\s*-->\s*\d+:\d+:\d+,\d+$", RegexOptions.Compiled);
public override string Extension
{