<?php $regex = '/(?<=Amount:)\d+/';$str = 'Date:21 Month:03 Year:2017 Amount:50 Category:Grocery Account:bank Note:expensive';preg_match_all($regex, $input, $matches);print_r($matches);
Date:21 Month:03 Year:2017 Amount:50 Category:Wow Account:The Note:This
Array ( [0] => Array ( ) )
PHP Notice: Undefined variable: input in /home/4rNbQX/prog.php on line 5
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!