| 3122 |
$input_node = $attr; |
$input_node = $attr; |
| 3123 |
} else { |
} else { |
| 3124 |
$input = $item->{node}->text_content; |
$input = $item->{node}->text_content; |
| 3125 |
$reg_sp = qr/\p{Zs}*/; |
$reg_sp = qr/\p{WhiteSpace}*/; |
| 3126 |
$input_node = $item->{node}; |
$input_node = $item->{node}; |
| 3127 |
|
|
| 3128 |
## ISSUE: What is the definition for "successfully extracts a date |
## ISSUE: What is the definition for "successfully extracts a date |
| 3135 |
my $second; |
my $second; |
| 3136 |
if ($input =~ / |
if ($input =~ / |
| 3137 |
\A |
\A |
| 3138 |
[\x09-\x0D\x20]* |
$reg_sp |
| 3139 |
([0-9]+) # 1 |
([0-9]+) # 1 |
| 3140 |
(?> |
(?> |
| 3141 |
-([0-9]+) # 2 |
-([0-9]+) # 2 |
| 3142 |
-([0-9]+) # 3 |
-((?>[0-9]+)) # 3 # Use (?>) such that yyyy-mm-ddhh:mm does not match |
| 3143 |
[\x09-\x0D\x20]* |
$reg_sp |
| 3144 |
(?> |
(?> |
| 3145 |
T |
T |
| 3146 |
[\x09-\x0D\x20]* |
$reg_sp |
| 3147 |
)? |
)? |
| 3148 |
([0-9]+) # 4 |
([0-9]+) # 4 |
| 3149 |
:([0-9]+) # 5 |
:([0-9]+) # 5 |
| 3150 |
(?> |
(?> |
| 3151 |
:([0-9]+(?>\.[0-9]*)?|\.[0-9]*) # 6 |
:([0-9]+(?>\.[0-9]*)?|\.[0-9]*) # 6 |
| 3152 |
)? |
)? |
| 3153 |
[\x09-\x0D\x20]* |
$reg_sp |
| 3154 |
(?> |
(?> |
| 3155 |
Z |
Z |
| 3156 |
[\x09-\x0D\x20]* |
$reg_sp |
| 3157 |
| |
| |
| 3158 |
[+-]([0-9]+):([0-9]+) # 7, 8 |
[+-]([0-9]+):([0-9]+) # 7, 8 |
| 3159 |
[\x09-\x0D\x20]* |
$reg_sp |
| 3160 |
)? |
)? |
| 3161 |
\z |
\z |
| 3162 |
| |
| |
| 3164 |
(?> |
(?> |
| 3165 |
:([0-9]+(?>\.[0-9]*)?|\.[0-9]*) # 10 |
:([0-9]+(?>\.[0-9]*)?|\.[0-9]*) # 10 |
| 3166 |
)? |
)? |
| 3167 |
[\x09-\x0D\x20]*\z |
$reg_sp |
| 3168 |
|
\z |
| 3169 |
) |
) |
| 3170 |
/x) { |
/x) { |
| 3171 |
if (defined $2) { ## YYYY-MM-DD T? hh:mm |
if (defined $2) { ## YYYY-MM-DD T? hh:mm |