diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2021-02-08 22:52:58 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-08 22:52:58 +0900 |
| commit | aea1c4f3108070c3da599c48d0cbcf49406226bd (patch) | |
| tree | 91f2dc8e5c756ef2ee411515b42ead5b382c5271 /MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs | |
| parent | 6c2eb5fc7e872a29b4a0951849681ae0764dbb8e (diff) | |
| parent | 256bb3ee989082ed10bfb0cb3f02481bf3292a43 (diff) | |
Merge pull request #5142 from M0ssTee/updateRegex
Replaced /d with [0-9], see issue #2923
Diffstat (limited to 'MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs index 4a87f87dc..ccef7eeea 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs @@ -79,7 +79,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles subEvent.Text = string.Join(ParserValues.NewLine, multiline); subEvent.Text = subEvent.Text.Replace(@"\N", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase); - subEvent.Text = Regex.Replace(subEvent.Text, @"\{(?:\\\d?[\w.-]+(?:\([^\)]*\)|&H?[0-9A-Fa-f]+&|))+\}", string.Empty, RegexOptions.IgnoreCase); + subEvent.Text = Regex.Replace(subEvent.Text, @"\{(?:\\[0-9]?[\w.-]+(?:\([^\)]*\)|&H?[0-9A-Fa-f]+&|))+\}", string.Empty, RegexOptions.IgnoreCase); subEvent.Text = Regex.Replace(subEvent.Text, "<", "<", RegexOptions.IgnoreCase); subEvent.Text = Regex.Replace(subEvent.Text, ">", ">", RegexOptions.IgnoreCase); subEvent.Text = Regex.Replace(subEvent.Text, "<(\\/?(font|b|u|i|s))((\\s+(\\w|\\w[\\w\\-]*\\w)(\\s*=\\s*(?:\\\".*?\\\"|'.*?'|[^'\\\">\\s]+))?)+\\s*|\\s*)(\\/?)>", "<$1$3$7>", RegexOptions.IgnoreCase); |
