<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>paranishian</author_name>
  <author_url>https://blog.hatena.ne.jp/paranishian/</author_url>
  <blog_title>paranitips</blog_title>
  <blog_url>https://paranishian.hateblo.jp/</blog_url>
  <categories>
    <anon>開発</anon>
  </categories>
  <description>PHPに限らず、正規表現のデリミタ（区切り文字）はスラッシュ/を使っていましたが、 http://hoge/fugaなど、パターンにスラッシュ/が含まれる場合は、 http:\/\/hoge\/fugaといったようにバックスラッシュ\でエスケープする必要があります。 この場合は、シャープ#やチルダ~をデリミタに使ったほうが便利です。 if(preg_match('#^' . $pattern . '$#', $path_info, $matches)){ var hoge = &quot;fuga&quot;; } それにしてもGoogleで#やら~やらの記号を検索するのって大変ですね…。 参考 PHP: デリミ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fparanishian.hateblo.jp%2Fentry%2Fphp%2Fdelimiters&quot; title=&quot;正規表現のデリミタ（区切り文字）のいろいろ - paranitips&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-06-23 01:19:27</published>
  <title>正規表現のデリミタ（区切り文字）のいろいろ</title>
  <type>rich</type>
  <url>https://paranishian.hateblo.jp/entry/php/delimiters</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
