Skip to content

Commit

Permalink
Make regex for UNTIL column more precise to parse comments correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Apr 15, 2024
1 parent c4c39a4 commit e2d124b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ impl Default for LineParser {
zone_line: Regex::new(
r##"(?x) ^
Zone \s+
( ?P<name> [ A-Z a-z 0-9 / _ + - ]+ ) \s+
( ?P<name> [A-Za-z0-9/_+-]+ ) \s+
( ?P<gmtoff> \S+ ) \s+
( ?P<rulessave> \S+ ) \s+
( ?P<format> \S+ ) \s*
( ?P<year> \S+ )? \s*
( ?P<month> \S+ )? \s*
( ?P<day> \S+ )? \s*
( ?P<time> \S+ )? \s*
( ?P<year> [0-9]+)? \s*
( ?P<month> [A-Za-z]+)? \s*
( ?P<day> [A-Za-z0-9><=]+ )? \s*
( ?P<time> [0-9:]+[suwz]? )? \s*
(\#.*)?
$ "##,
)
Expand All @@ -201,10 +201,10 @@ impl Default for LineParser {
( ?P<gmtoff> \S+ ) \s+
( ?P<rulessave> \S+ ) \s+
( ?P<format> \S+ ) \s*
( ?P<year> \S+ )? \s*
( ?P<month> \S+ )? \s*
( ?P<day> \S+ )? \s*
( ?P<time> \S+ )? \s*
( ?P<year> [0-9]+)? \s*
( ?P<month> [A-Za-z]+)? \s*
( ?P<day> [A-Za-z0-9><=]+ )? \s*
( ?P<time> [0-9:]+[suwz]? )? \s*
(\#.*)?
$ "##,
)
Expand Down

0 comments on commit e2d124b

Please sign in to comment.