作者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)
1F:推 CindyLinz:也有 match 到喔~ 它 match 了第一个 # 前面那个没有字 03/13 12:14
2F:→ CindyLinz:的缝缝 :p 03/13 12:14
3F:→ cutekid:原来如此,谢谢 CindyLinz 03/14 08:24