{"id":325,"date":"2024-10-04T13:00:06","date_gmt":"2024-10-04T12:00:06","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=325"},"modified":"2024-10-04T13:00:06","modified_gmt":"2024-10-04T12:00:06","slug":"mwnci-regexp-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-regexp-function\/","title":{"rendered":"Mwnci regexp() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>regexp(<i><b>regexp<\/b><\/i>, <i><b>file<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p>The <i>regexp()<\/i> function returns an array of lines from the <i>file<\/i> that match the regular expression <i>regexp<\/i>.<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>println(regexp(\"^foobar\", \"\/etc\/passwd\"))\r\n\r\n\r\n[foobar:x:1000:100:Foo Bar,,,:\/home\/foo:\/bin\/bash, foobar1:x:1001:100:Foo Bart:\/home\/foobar1:\/bin\/sh]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax regexp(regexp, file) Description The regexp() function returns an array of lines from the file that match the regular expression regexp. Example println(regexp(&#8220;^foobar&#8221;, &#8220;\/etc\/passwd&#8221;)) [foobar:x:1000:100:Foo Bar,,,:\/home\/foo:\/bin\/bash, foobar1:x:1001:100:Foo Bart:\/home\/foobar1:\/bin\/sh]<\/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-325","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/325","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=325"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/325\/revisions"}],"predecessor-version":[{"id":326,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/325\/revisions\/326"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}