<?php$msg = "Pancake, Waffle -400";$regex = '~-?\d+~';preg_match($regex, $msg, $match);print_r($match);?>
Standard input is empty
Array ( [0] => -400 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!