mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-13 08:30:07 +01:00
feat: match ISO datetimes
This commit is contained in:
parent
8cc42dbe44
commit
7ce0e95c8c
3 changed files with 35 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ pub(super) const EXCLUDE_PATTERNS: [(&str, &str); 1] =
|
|||
///
|
||||
/// The email address was obtained at https://www.regular-expressions.info/email.html.
|
||||
/// Others were obtained from Ferran Basora.
|
||||
pub(super) const PATTERNS: [(&str, &str); 16] = [
|
||||
pub(super) const PATTERNS: [(&str, &str); 17] = [
|
||||
("markdown-url", r"\[[^]]*\]\(([^)]+)\)"),
|
||||
(
|
||||
"url",
|
||||
|
|
@ -32,6 +32,10 @@ pub(super) const PATTERNS: [(&str, &str); 16] = [
|
|||
("ipv4", r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"),
|
||||
("ipv6", r"[A-f0-9:]+:+[A-f0-9:]+[%\w\d]+"),
|
||||
("pointer-address", r"0x[0-9a-fA-F]+"),
|
||||
(
|
||||
"datetime",
|
||||
r"(\d{4}-?\d{2}-?\d{2}([ T]\d{2}:\d{2}:\d{2}(\.\d{3,9})?)?)",
|
||||
),
|
||||
("digits", r"[0-9]{4,}"),
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue