我有一个电影的字幕文件,如下所示:
2
00:00:44,687 --> 00:00:46,513
Let's begin.
3
00:01:01,115 --> 00:01:02,975
Very good.
4
00:01:05,965 --> 00:01:08,110
What was your wife's name?
5
00:01:08,943 --> 00:01:12,366
- Mary.
- Mary, alright.
6
00:01:15,665 --> 00:01:18,938
He seeks the spirit
of Mary Browning.
7
00:01:20,446 --> 00:01:24,665
Mary, we invite you
into our circle.
8
00:01:28,776 --> 00:01:32,834
Mary Browning,
we invite you into our circle.
....
现在我只想匹配实际的字幕文本内容,例如,
- Mary.
- Mary, alright.
或者
He seeks the spirit
of Mary Browning.
包括它们可能包含的特殊字符、数字和/或换行符。但我不想匹配时间字符串和序列号。
所以基本上我想只用字母匹配所有包含数字和特殊字符的行,而不是数字和特殊字符,它们单独存在于其他行,如时间字符串和序列号。
如何匹配并添加标签<font color="#FFFF00">[subtitle text any...]</font>
到我与 Regex 的帮助匹配的每个字幕?
意思如下:
<font color="#FFFF00">He seeks the spirit
of Mary Browning.</font>