Re: [請益] 刪除特殊字串, 保留其它內容(soved)

看板Perl作者 (Caspar)時間4年前 (2020/04/19 11:41), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
: 顯示如下: : (7006): actual bit length 16 differs from formal bit length 13 for port : "cfgbp_link2csr" : (120): truncated value with size 64 to match size of target (32) : (144): truncated value with size 64 to match size of target (32) : (241): truncated value with size 5 to match size of target (4) : 但是砍掉就還不知道怎麼做... : 期望是: : : actual bit length 16 differs from formal bit length 13 for port : "cfgbp_link2csr" : : truncated value with size 64 to match size of target (32) : : truncated value with size 64 to match size of target (32) : : truncated value with size 5 to match size of target (4) 研究出來用以下code可以搞定, 謝謝~ $string_2 =~ tr/^\([0-9]+\)//d; 就可以印出上述的要求了 -- The elevator to success is out of order. You'll have to use the stairs one step at a time. 像搭電梯般快速成功是不切實際的。你必需沿著樓梯,一步一階的往上爬。 Joe Girard -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.137.246.134 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Perl/M.1587267702.A.C13.html
文章代碼(AID): #1UcyXsmJ (Perl)
文章代碼(AID): #1UcyXsmJ (Perl)