淺顯講解perl的模式匹配

perl 接觸的還不是不少,就把最近用到的匹配相關整理一下,拿出來分享一下。正則表達式 首先介紹也關於perl字符串匹配的兩個運算符學習 =~ 匹配成功返回true,失敗返回falseurl !~ 不匹配成功返回true,失敗返回falsespa for example :翻譯 my $testString = "hello world"; if ($testString =~ /hello/)
相關文章
相關標籤/搜索