You can create register listener on KernelException event and define any logic you need there. Like this:

use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;

class YourKernelExceptionListener
{
    public function onKernelExcpetion(GetResponseForExceptionEvent $event)
    {
        // if the exception is instance of Symfony NotFoundHttpException
        // you can do whatever you need and render whatever you need
    }
}


Symfony 2 and Twig custom error page
with linux bash shell , how can i use regex to get a certain string of a file

by example:

for filename *.tgz
do 

"get the certain string of filename (in my case, get 2010.04.12 of file 2010.01.12myfile.tgz)"

done  

or should I turn to perl

Merci

frank
