| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Regexp::Pattern::Filename::Type::Image::WhatsApp; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
471305
|
use 5.010001; |
|
|
1
|
|
|
|
|
3
|
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
21
|
|
|
5
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
195
|
|
|
6
|
|
|
|
|
|
|
#use utf8; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
|
9
|
|
|
|
|
|
|
our $DATE = '2024-12-21'; # DATE |
|
10
|
|
|
|
|
|
|
our $DIST = 'Regexp-Pattern-Filename-Type-Image-WhatsApp'; # DIST |
|
11
|
|
|
|
|
|
|
our $VERSION = '0.004'; # VERSION |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our %RE; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$RE{filename_type_image_whatsapp} = { |
|
16
|
|
|
|
|
|
|
summary => 'Image filename saved by WhatsApp', |
|
17
|
|
|
|
|
|
|
pat => qr/\AIMG-[0-9]{8}-WA[0-9]{4,}\.(?:JPE?G|jpe?g)\z/, |
|
18
|
|
|
|
|
|
|
tags => ['anchored'], |
|
19
|
|
|
|
|
|
|
examples => [ |
|
20
|
|
|
|
|
|
|
{str=>'foo.jpg', matches=>0, summary=>'No pattern'}, |
|
21
|
|
|
|
|
|
|
{str=>'VID-20210922-WA0001.mp4', matches=>0, summary=>'Video, not image'}, |
|
22
|
|
|
|
|
|
|
{str=>'IMG-20210922-WA0001.jpg', matches=>1}, |
|
23
|
|
|
|
|
|
|
{str=>'IMG-20210922-WA0001.jpeg', matches=>1}, |
|
24
|
|
|
|
|
|
|
{str=>'IMG-20210922-WA0001.txt', matches=>0, summary=>'Wrong extension'}, |
|
25
|
|
|
|
|
|
|
], |
|
26
|
|
|
|
|
|
|
}; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
|
29
|
|
|
|
|
|
|
# ABSTRACT: Image filename saved by WhatsApp |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |