Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はいくつかのphpコードを読み込もうとしていますが、なぜpreg_replaceに常にスラッシュがあるのか 疑問に思っていました. 私がC++で書いた正規表現では、同じことをしていないので、なぜだろうと思っていました
PHP:preg_replace('/blah/', '', $str)しかし C++ では、文字列だけで正規表現を作成します"blah"
preg_replace('/blah/', '', $str)
"blah"
ここで説明してもらえますか?開始スラッシュと終了スラッシュは何ですか? ありがとう