-3
자사의 유선 질문 대 물결과 동등 일치하지만 난 "문자열"내가 찾으려고 노력하고 다음 =~
및 ==
정규식 이중 등호
의 차이가 무엇인지 알고 싶어요.
if($ua =~ "friendly-scanner") {
drop()
}
대
if($ua == "friendly-scanner") {
drop()
}
예
자사의 유선 질문 대 물결과 동등 일치하지만 난 "문자열"내가 찾으려고 노력하고 다음 =~
및 ==
정규식 이중 등호
의 차이가 무엇인지 알고 싶어요.
if($ua =~ "friendly-scanner") {
drop()
}
대
if($ua == "friendly-scanner") {
drop()
}
예
=~ - Does a regular expression matching
== - Compares two for equality
:
if($ua =~ "^friendly") is "$ua begins with friendly"
if($ua == "friendly") is "$ua exact match with friendly"