<?php $string = "adapter-UDP02_sistem10_a.log"; preg_match("/-(.*?)_/", $string, $result); var_dump( $result[1] );
Standard input is empty
string(5) "UDP02"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!