I am not very experienced with bash scripting. But I am trying to validate individual xml files with corresponding xsd files in a directory. The beginning name does not change but the dates changes. 

For example:

* File1.xsd
* File2.xsd
* File3.xsd
* File1\_random\_date.xml (random date time can be 2016\_06\_12\_10\_38\_13)
* File2\_random\_date.xml
* File2\_random\_date.xml
* File3\_random\_date.xml

I would like validate all File2\*.xml files against File2.xsd and all File1\*.xml against File1.xsd etc etc

 something like:

```
xmllint --noout --schema File2.xsd File2_*.xml
xmllint --noout --schema File1.xsd File1_*.xml

```

But i am not sure how to have regex string maybe for dates and say if File2\_\*.xml exist, validates each file against File2.xsd.

Any help please?