{"id":288,"date":"2024-10-03T08:42:31","date_gmt":"2024-10-03T07:42:31","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=288"},"modified":"2024-10-03T08:42:31","modified_gmt":"2024-10-03T07:42:31","slug":"mwnci-match-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-match-function\/","title":{"rendered":"Mwnci match() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>match(<i><b>regexp<\/b><\/i>, <i><b>string<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p>The function <i>match()<\/i> returns a string holding the text of the leftmost match of the regular expression. A return value of NULL indicates no match.<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>if (match(\"^foo\", \"foobar\")) {\r\n    println(\"A match\")\r\n} else {\r\n    println(\"No match\")\r\n}\r\n\r\n\r\nA match\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax match(regexp, string) Description The function match() returns a string holding the text of the leftmost match of the regular expression. A return value of NULL indicates no match. Example if (match(&#8220;^foo&#8221;, &#8220;foobar&#8221;)) { println(&#8220;A match&#8221;) } else { println(&#8220;No match&#8221;) } A match<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-288","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=288"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/288\/revisions"}],"predecessor-version":[{"id":289,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/288\/revisions\/289"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}