diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index 43bc1eee4..46efc4f92 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -588,7 +588,7 @@ InlineSpan buildContent( if (patternStr.isNotEmpty) { patternStr += "|"; } - patternStr += r'(\b\d{1,2}[::]\d{2}(?:[::]\d{2})?\b)'; + patternStr += r'(\b(?:\d+[::])?[0-5]?[0-9][::][0-5]?[0-9]\b)'; final RegExp pattern = RegExp(patternStr); List matchedStrs = []; void addPlainTextSpan(str) { @@ -636,8 +636,8 @@ InlineSpan buildContent( }, ), ); - } else if (RegExp(r'^\b\d{1,2}[::]\d{2}(?:[::]\d{2})?\b$') - .hasMatch(matchStr)) { + + } else if (RegExp(r'^\b(?:\d+[::])?[0-5]?[0-9][::][0-5]?[0-9]\b$').hasMatch(matchStr)) { matchStr = matchStr.replaceAll(':', ':'); spanChilds.add( TextSpan(