{"id":2707,"date":"2021-09-18T08:42:43","date_gmt":"2021-09-18T08:42:43","guid":{"rendered":"https:\/\/phptutorial.net\/?page_id=2707"},"modified":"2025-04-07T13:24:59","modified_gmt":"2025-04-07T13:24:59","slug":"php-preg_match_all","status":"publish","type":"page","link":"https:\/\/www.phptutorial.net\/php-tutorial\/php-preg_match_all\/","title":{"rendered":"PHP preg_match_all"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you&#8217;ll learn how to use the PHP <code>preg_match_all()<\/code> function to search for all matches to a regular expression in a string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-the-php-preg_match_all-function'>Introduction to the PHP preg_match_all() function <a href=\"#introduction-to-the-php-preg_match_all-function\" class=\"anchor\" id=\"introduction-to-the-php-preg_match_all-function\" title=\"Anchor for Introduction to the PHP preg_match_all() function\">#<\/a><\/h2>\n\n\n\n<p>The <code>preg_match_all()<\/code> function searches for all the matches to a <a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-regular-expressions\/\">regular expression<\/a> in a string.<\/p>\n\n\n\n<p>Unlike the <code><a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-preg_match\/\">preg_match()<\/a><\/code> function that stops searching when it finds the first match, the <code>preg_match_all()<\/code> function continues searching for the next matches till the end of the string.<\/p>\n\n\n\n<p>The following shows the syntax of the <code>preg_match_all()<\/code> function:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">preg_match_all(\n    string $pattern,\n    string $subject,\n    <span class=\"hljs-keyword\">array<\/span> &amp;$matches = <span class=\"hljs-keyword\">null<\/span>,\n    int $flags = <span class=\"hljs-number\">0<\/span>,\n    int $offset = <span class=\"hljs-number\">0<\/span>\n): int|<span class=\"hljs-keyword\">false<\/span>|<span class=\"hljs-keyword\">null<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>preg_match_all()<\/code> function accepts the following parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>$pattern<\/code> is a string that specifies the pattern to search.<\/li>\n\n\n\n<li><code>$subject<\/code> is the input string to match the pattern.<\/li>\n\n\n\n<li><code>$matches<\/code> is a multi-dimensional array that contains all the matches.<\/li>\n\n\n\n<li><code>$flags<\/code> is a combination of the flags <code>PREG_PATTERN_ORDER<\/code>, <code>PREG_SET_ORDER<\/code>, <code>PREG_OFFSET_CAPTURE<\/code>, and <code>PREG_UNMATCHED_AS_NULL<\/code>. By default, the <code>$flags<\/code> is <code>PREG_PATTERN_ORDER<\/code> if you skip it.<\/li>\n\n\n\n<li><code>$offset<\/code> is an integer that specifies the position from which the search starts. By default, the <code>preg_match_all()<\/code> function starts searching from the beginning of the string.<\/li>\n<\/ul>\n\n\n\n<p>The <code>preg_match_all()<\/code> function returns a number that specifies the number of full pattern matches. If there is no match, the <code>preg_match_all()<\/code> function returns zero. In case of failure, it returns <code>false<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='php-preg_match_all-function-examples'>PHP preg_match_all() function examples <a href=\"#php-preg_match_all-function-examples\" class=\"anchor\" id=\"php-preg_match_all-function-examples\" title=\"Anchor for PHP preg_match_all() function examples\">#<\/a><\/h2>\n\n\n\n<p>Let&#8217;s take some examples of using the <code>preg_match_all()<\/code> function.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id='1-using-the-php-preg_match_all-function-to-match-numbers-in-a-string-example'>1) Using the PHP preg_match_all() function to match numbers in a string example <a href=\"#1-using-the-php-preg_match_all-function-to-match-numbers-in-a-string-example\" class=\"anchor\" id=\"1-using-the-php-preg_match_all-function-to-match-numbers-in-a-string-example\" title=\"Anchor for 1) Using the PHP preg_match_all() function to match numbers in a string example\">#<\/a><\/h3>\n\n\n\n<p>The following example uses the <code>preg_match_all()<\/code> function to search for all numbers with one or more digits in a string:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n$pattern = <span class=\"hljs-string\">'\/\\d+\/'<\/span>;\n$str = <span class=\"hljs-string\">'PHP 1.0 released in 1995'<\/span>;\n\n<span class=\"hljs-keyword\">if<\/span> (preg_match_all($pattern, $str, $matches)) {\n    print_r($matches);\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCiRwYXR0ZXJuID0gJy9cZCsvJzsKJHN0ciA9ICdQSFAgMS4wIHJlbGVhc2VkIGluIDE5OTUnOwoKaWYgKHByZWdfbWF0Y2hfYWxsKCRwYXR0ZXJuLCAkc3RyLCAkbWF0Y2hlcykpIHsKICAgIHByaW50X3IoJG1hdGNoZXMpOwp9\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">Array<\/span>\n(\n    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; <span class=\"hljs-number\">1<\/span>\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-number\">0<\/span>\n            &#91;<span class=\"hljs-number\">2<\/span>] =&gt; <span class=\"hljs-number\">1995<\/span>\n        )\n)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>It returns three matches <code>0<\/code>, <code>1<\/code>, and <code>1995<\/code>. If you use the <code>preg_match()<\/code> function, it&#8217;ll return the first number (<code>1<\/code>) only.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id='2-using-the-preg_match_all-function-with-flags-parameters'>2) Using the preg_match_all() function with flags parameters <a href=\"#2-using-the-preg_match_all-function-with-flags-parameters\" class=\"anchor\" id=\"2-using-the-preg_match_all-function-with-flags-parameters\" title=\"Anchor for 2) Using the preg_match_all() function with flags parameters\">#<\/a><\/h3>\n\n\n\n<p>The following example uses the <code>preg_match_all()<\/code> function to match the word in a string. It also captures the first character of each word:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n$pattern = <span class=\"hljs-string\">'\/\\b(&#91;a-zA-Z])\\w+\\b\/'<\/span>;\n$str = <span class=\"hljs-string\">'Alice, Bob, Peter'<\/span>;\n\n<span class=\"hljs-keyword\">if<\/span> (preg_match_all($pattern, $str, $matches)) {\n    print_r($matches);\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCiRwYXR0ZXJuID0gJy9cYihbYS16QS1aXSlcdytcYi8nOwokc3RyID0gJ0FsaWNlLCBCb2IsIFBldGVyJzsKCmlmIChwcmVnX21hdGNoX2FsbCgkcGF0dGVybiwgJHN0ciwgJG1hdGNoZXMpKSB7CiAgICBwcmludF9yKCRtYXRjaGVzKTsKfQ\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">Array<\/span>\n(\n    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; Alice\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; Bob\n            &#91;<span class=\"hljs-number\">2<\/span>] =&gt; Peter\n        )\n\n    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; A\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; B\n            &#91;<span class=\"hljs-number\">2<\/span>] =&gt; P\n        )\n)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>$matche<\/code>s array contains the full pattern matches in the first element and the capturing groups in the second element. It returns the same result as if you use the <code>PREG_PATTERN_ORDER<\/code> flag.<\/p>\n\n\n\n<p>If you want to group each set of matches in an array element, you can use the <code>PREG_SET_ORDER<\/code> flag.<\/p>\n\n\n\n<p>The <code>PREG_SET_ORDER<\/code> flag groups the first set of matches in the <code>$matches[0]<\/code>, the second est of matches in the <code>$matches[1]<\/code>, and so on. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n$pattern = <span class=\"hljs-string\">'\/\\b(&#91;a-zA-Z])\\w+\\b\/'<\/span>;\n$str = <span class=\"hljs-string\">'Alice, Bob, Peter'<\/span>;\n\n<span class=\"hljs-keyword\">if<\/span> (preg_match_all($pattern, $str, $matches, PREG_SET_ORDER)) {\n    print_r($matches);\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCiRwYXR0ZXJuID0gJy9cYihbYS16QS1aXSlcdytcYi8nOwokc3RyID0gJ0FsaWNlLCBCb2IsIFBldGVyJzsKCmlmIChwcmVnX21hdGNoX2FsbCgkcGF0dGVybiwgJHN0ciwgJG1hdGNoZXMsIFBSRUdfU0VUX09SREVSKSkgewogICAgcHJpbnRfcigkbWF0Y2hlcyk7Cn0\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">Array<\/span>\n(\n    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; Alice\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; A\n        )\n\n    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; Bob\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; B\n        )\n\n    &#91;<span class=\"hljs-number\">2<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; Peter\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; P\n        )\n)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>$flags<\/code> can also be:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>PREG_OFFSET_CAPTURE<\/code> returns the offset of the match together with the matched string.<\/li>\n\n\n\n<li><code>PREG_UNMATCHED_AS_NULL<\/code> returns <code>NULL<\/code> instead of an empty string if no match is found for the subpatterns a.k.a <a href=\"https:\/\/phptutorial.net\/php-tutorial\/regex-capturing-groups\/\">capturing groups<\/a>.<\/li>\n<\/ul>\n\n\n\n<p>To combine flags, you place the <code>|<\/code> operator between two of them. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n$pattern = <span class=\"hljs-string\">'\/\\b(&#91;a-zA-Z])\\w+\\b\/'<\/span>;\n$str = <span class=\"hljs-string\">'Alice, Bob, Peter'<\/span>;\n\n<span class=\"hljs-keyword\">if<\/span> (preg_match_all($pattern, $str, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {\n    print_r($matches);\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCiRwYXR0ZXJuID0gJy9cYihbYS16QS1aXSlcdytcYi8nOwokc3RyID0gJ0FsaWNlLCBCb2IsIFBldGVyJzsKCmlmIChwcmVnX21hdGNoX2FsbCgkcGF0dGVybiwgJHN0ciwgJG1hdGNoZXMsIFBSRUdfU0VUX09SREVSIHwgUFJFR19PRkZTRVRfQ0FQVFVSRSkpIHsKICAgIHByaW50X3IoJG1hdGNoZXMpOwp9\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">Array<\/span>\n(\n    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n                (\n                    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; Alice\n                    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-number\">0<\/span>\n                )\n\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n                (\n                    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; A\n                    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-number\">0<\/span>\n                )\n\n        )\n\n    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n                (\n                    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; Bob\n                    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-number\">7<\/span>\n                )\n\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n                (\n                    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; B\n                    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-number\">7<\/span>\n                )\n\n        )\n\n    &#91;<span class=\"hljs-number\">2<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n        (\n            &#91;<span class=\"hljs-number\">0<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n                (\n                    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; Peter\n                    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-number\">12<\/span>\n                )\n\n            &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-keyword\">Array<\/span>\n                (\n                    &#91;<span class=\"hljs-number\">0<\/span>] =&gt; P\n                    &#91;<span class=\"hljs-number\">1<\/span>] =&gt; <span class=\"hljs-number\">12<\/span>\n                )\n\n        )\n\n)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Note that it doesn&#8217;t make sense to combine <code>PREG_PATTERN_ORDER<\/code> and <code>PREG_SET_ORDER<\/code> flags.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the PHP <code>preg_match_all()<\/code> function to search for all matches in a string.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Did you find this tutorial useful?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"2707\"\n\t\t\t\tdata-post-url=\"https:\/\/www.phptutorial.net\/php-tutorial\/php-preg_match_all\/\"\n\t\t\t\tdata-post-title=\"PHP preg_match_all\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"2707\"\n\t\t\t\tdata-post-url=\"https:\/\/www.phptutorial.net\/php-tutorial\/php-preg_match_all\/\"\n\t\t\t\tdata-post-title=\"PHP preg_match_all\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you&#8217;ll learn how to use the PHP preg_match_all() function to perform a global regular expression match.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":15,"menu_order":139,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2707","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/2707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/comments?post=2707"}],"version-history":[{"count":4,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/2707\/revisions"}],"predecessor-version":[{"id":3269,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/2707\/revisions\/3269"}],"up":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/15"}],"wp:attachment":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/media?parent=2707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}