[問題] 有關 regular expression
Perl 版本: ActivePerl 5.16.3
程式如下:
#!/usr/bin/perl -w
use utf8;
$s = '#印#';
use bytes;
############
# match 不到
($match) = $s =~ /([\x80-\xff]*)/;
print "match:[$match]\n";
############
# match 的到
($match) = $s =~ /([\x80-\xff]+)/;
print "match:[$match]\n";
問題:
為什麼我用 * 時會 match 不到呢 ??
謝謝 ^_^
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.221.80.36
※ 編輯: cutekid 來自: 61.221.80.36 (03/13 11:44)
※ 編輯: cutekid 來自: 61.221.80.36 (03/13 11:44)
推
03/13 12:14, , 1F
03/13 12:14, 1F
→
03/13 12:14, , 2F
03/13 12:14, 2F
→
03/14 08:24, , 3F
03/14 08:24, 3F
Perl 近期熱門文章
PTT數位生活區 即時熱門文章