[PHP] A quick ereg translation

2012-08-25 Thread Lester Caine
ereg('body(.*)/body', $phpinfo, $regs); Pulls the body of phpinfo() to use with a tidy header of other system information, but I'm struggling to get a pcre alternative. Anybody already cracked this one? -- Lester Caine - G8HFL - Contact -

Re: [PHP] A quick ereg translation

2012-08-25 Thread Sebastian Krebs
Am 25.08.2012 23:06, schrieb Lester Caine: ereg('body(.*)/body', $phpinfo, $regs); Pulls the body of phpinfo() to use with a tidy header of other system information, but I'm struggling to get a pcre alternative. Anybody already cracked this one? usually it's just fine to wrap the pattern

RE: [PHP] A quick ereg translation

2012-08-25 Thread SagaciousDev PHP-Dev
+0200 From: krebs@gmail.com To: php-general@lists.php.net Subject: Re: [PHP] A quick ereg translation Am 25.08.2012 23:06, schrieb Lester Caine: ereg('body(.*)/body', $phpinfo, $regs); Pulls the body of phpinfo() to use with a tidy header of other system information, but I'm

Re: [PHP] A quick ereg translation

2012-08-25 Thread Lester Caine
SagaciousDev PHP-Dev wrote: This should do the trick: preg_match('#body(.*)/body#is', $content, $matches); TA - That has got it ;) That is tidier than what I had ended up with ... #body([^\']*?)\/body# from a 'tutorial' -- Lester Caine - G8HFL - Contact -