是什么意思s#^.*/##s
因为我知道在模式中'.'表示它可以代表随机字母,除了\n.
那么'.*'应该代表随机字母的随机数量.
但在书中它说这将删除所有unix类型的路径.
我的问题是,这是否意味着我可以用空格替换随机字母的随机数量?
s -> subsitution # -> pattern delimiter ^.* -> all chars 0 or more times from the begining / -> literal / ## -> replace by nothing (2 delimiters) s -> single line mode ( the dot can match newline)