mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Consistent with sub-formats regex
This commit is contained in:
parent
5f05b52e05
commit
17e7c898da
@ -10,7 +10,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
public class Idx : SubtitleFormat
|
||||
{
|
||||
// timestamp: 00:00:01:401, filepos: 000000000
|
||||
private static Regex _regexTimeCodes = new Regex(@"^timestamp: \d+:\d+:\d+:\d+, filepos: [\dabcdefABCDEF]+$", RegexOptions.Compiled);
|
||||
private static readonly Regex RegexTimeCodes = new Regex(@"^timestamp: \d+:\d+:\d+:\d+, filepos: [\dabcdefABCDEF]+$", RegexOptions.Compiled);
|
||||
|
||||
public Hashtable NonTimeCodes = new Hashtable();
|
||||
|
||||
@ -86,7 +86,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
char[] splitChars = { ',', ':' };
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (_regexTimeCodes.IsMatch(line))
|
||||
if (RegexTimeCodes.IsMatch(line))
|
||||
{
|
||||
Paragraph p = GetParagraph(line.Split(splitChars, StringSplitOptions.RemoveEmptyEntries));
|
||||
if (p != null)
|
||||
|
Loading…
Reference in New Issue
Block a user