1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/perl use strict; use warnings; use 5.024; use utf8; my $RE = qr/v=([\w\-^&]+)/; for my $data (<DATA>) { my $catch; say "$catch Match!" if ($catch) = $data =~ $RE; } __DATA__ v=99&t=91a v=o v=1&&&& v=&&&& __END__ ergbt: 99&t Match! o Match! 1&&&& Match! &&&& Match!
/((?[ \w & ! [in] ])+)/
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/perl use warnings; use 5.036; my $RE = qr/((?[ \w & ! [in] ])+)/; for my $data (<DATA>) { my $catch; say "$catch Match!" if ($catch) = $data =~ $RE; } __DATA__ abcdefghijklmnopqrstuvwxyz in words