UNIX command to get the latest file and also matching pattern

we want to fetch the latest file in a given directory and also the file name should match the below pattern

 
 Example file name ->hrdata-2015-10-13-16-45-26.xml(2015-10-13-16-45-26- it is not current timestamp, we just need to check for the pattern)
  
 

We expect the file will have the following structure

hrdata-yyyy-mm-dd-hh-mm-ss.xml

Please help us with the UNIX command to be used in shell script to fetch the latest file and also the matching pattern

Which OS and shell version do you use?

AIX server version-7100-04-02-1614

shell version-KSH

Try

ls hrdata-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-*.xml | tail -1
hrdata-2015-10-13-16-45-27.xml

You can continue/refine the pattern if you really need the EXACT file name structure to be matched.