Hey all,
I have some data like mg-st-005.xyz.pqr.dyd .
I want to have the string mg-st-005 ( string before the first "."(dot) )
I have tried that using preg_match
preg_match("/(.*)\./",$host,$matches);
But the above gives me mg-st-005.xyz.pqr and I want to have mg-st-005 only..
can you please help me?
Thanks...