[問題] 有關 regular expression

看板Perl作者 (可愛小孩子)時間11年前 (2014/03/13 11:43), 編輯推噓1(102)
留言3則, 2人參與, 最新討論串1/1
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
也有 match 到喔~ 它 match 了第一個 # 前面那個沒有字
03/13 12:14, 1F

03/13 12:14, , 2F
的縫縫 :p
03/13 12:14, 2F

03/14 08:24, , 3F
原來如此,謝謝 CindyLinz
03/14 08:24, 3F
文章代碼(AID): #1J8IbTcD (Perl)
文章代碼(AID): #1J8IbTcD (Perl)