<?php $string = "atm123456";$pattern = "(atm\d+)";preg_match($pattern, $string, $matches);print_r($matches); ?>
Standard input is empty
Array ( [0] => atm123456 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!