Changes between Version 30 and Version 31 of Rules/PublicTransportGtfs


Ignore:
Timestamp:
2021-02-09T19:16:31+01:00 (5 years ago)
Author:
skyper
Comment:

soften regex for route_id

Legend:

Unmodified
Added
Removed
Modified
  • Rules/PublicTransportGtfs

    v30 v31  
    257257/* route_id, shape_id, trip_id */
    258258/* FIXME: Get proper syntax as regex displayed. */
    259 *[gtfs:route_id      ][gtfs:route_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?(;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?)*$/],
    260 *[gtfs:shape_id      ][gtfs:shape_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR](;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR])*$/],
    261 *[gtfs:trip_id       ][gtfs:trip_id        !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR])*$/],
    262 *[gtfs:trip_id:sample][gtfs:trip_id:sample !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-[A-Z])?-j[1-9][0-9j]-[1-9][0-9]?\.[1-9][0-9]{0,2}\.[HR])*$/] {
     259*[gtfs:route_id      ][gtfs:route_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-?[A-Z])?-j[1-9][0-9j]-[0-9]+(;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-?[A-Z])?-j[1-9][0-9j]-[0-9]+)*$/],
     260*[gtfs:shape_id      ][gtfs:shape_id       !~                           /^[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-?[A-Z])?-j[1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-?[A-Z])?-j[1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/],
     261*[gtfs:trip_id       ][gtfs:trip_id        !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-?[A-Z])?-j[1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-?[A-Z])?-j[1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/],
     262*[gtfs:trip_id:sample][gtfs:trip_id:sample !~ /^[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-?[A-Z])?-j[1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR](;[ ]?[1-9][0-9]{0,3}\.T[023A]\.[0-9]{1,2}-[A-Z]?[0-9]{1,3}(-?[A-Z])?-j[1-9][0-9j]-[0-9]+\.[1-9][0-9]{0,2}\.[HR])*$/] {
    263263  throwError: tr("Value `{0}` for `{1}=*` does not match value syntax.", "{0.value}", "{0.key}");
    264264/*  throwError: tr("Value `{0}` for `{1}=*` does not match value syntax `{2}`.", "{0.value}", "{0.key}", "{1.value}"); */
     
    441441  assertNoMatch: "relation gtfs:trip_id:sample=1108.T2.11-4-I-j20-1.10.H gtfs:trip_id=1108.T2.11-4-I-j20-1.10.H";
    442442}
    443 *[gtfs:route_id][gtfs:shape_id      ]!.MultipleID!.GtfsIdSyntax[!(tag("gtfs:route_id") == get(regexp_match("^(.+)\\.[1-9][0-9]?\\.[HR]$", tag("gtfs:shape_id")), 1))],
    444 *[gtfs:route_id][gtfs:trip_id       ]!.MultipleID!.GtfsIdSyntax[!(tag("gtfs:route_id") == get(regexp_match("^[1-9][0-9]{0,3}\\.T[023A]\\.(.+)\\.[1-9][0-9]?\\.[HR]$", tag("gtfs:trip_id")), 1))],
    445 *[gtfs:route_id][gtfs:trip_id:sample]!.MultipleID!.GtfsIdSyntax[!(tag("gtfs:route_id") == get(regexp_match("^[1-9][0-9]{0,3}\\.T[023A]\\.(.+)\\.[1-9][0-9]?\\.[HR]$", tag("gtfs:trip_id:sample")), 3))],
     443*[gtfs:route_id][gtfs:shape_id      ]!.MultipleID!.GtfsIdSyntax[!(tag("gtfs:route_id") == get(regexp_match("^(.+)\\.[0-9]+\\.[HR]$", tag("gtfs:shape_id")), 1))],
     444*[gtfs:route_id][gtfs:trip_id       ]!.MultipleID!.GtfsIdSyntax[!(tag("gtfs:route_id") == get(regexp_match("^[1-9][0-9]{0,3}\\.T[023A]\\.(.+)\\.[0-9]+\\.[HR]$", tag("gtfs:trip_id")), 1))],
     445*[gtfs:route_id][gtfs:trip_id:sample]!.MultipleID!.GtfsIdSyntax[!(tag("gtfs:route_id") == get(regexp_match("^[1-9][0-9]{0,3}\\.T[023A]\\.(.+)\\.[0-9]+\\.[HR]$", tag("gtfs:trip_id:sample")), 3))],
    446446*[gtfs:shape_id][gtfs:trip_id       ]!.MultipleID!.GtfsIdSyntax[!(tag("gtfs:shape_id") == get(regexp_match("^[1-9][0-9]{0,3}\\.T[023A]\\.(.+)$", tag("gtfs:trip_id")), 1))],
    447447*[gtfs:shape_id][gtfs:trip_id:sample]!.MultipleID!.GtfsIdSyntax[!(tag("gtfs:shape_id") == get(regexp_match("^[1-9][0-9]{0,3}\\.T[023A]\\.(.+)$", tag("gtfs:trip_id:sample")), 1))] {