作者cutekid (可愛小孩子)
看板Perl
標題[問題] 有關 wrapped in unpack
時間Thu Mar 13 11:43:23 2014
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)
推 CindyLinz:也有 match 到喔~ 它 match 了第一個 # 前面那個沒有字 03/13 12:14
→ CindyLinz:的縫縫 :p 03/13 12:14
→ cutekid:原來如此,謝謝 CindyLinz 03/14 08:24