Hello All,
I have two strings one is valid and another is not valid i need read only valid xml files for loading,so kindly help me with a regular expression which validates the string and tells as valid /Invalid.
string faString1 = "FA557_740Lxe.xml"; [Valid]
string faString2 = "FAlist_G31.xml"; [InValid]
Thank you
Loading
VulpesPosted Apr 3, 2014, 5:19 AM
string regExp = @"^[a-zA-Z]{2}\d+_[a-zA-Z0-9]+\.xml$";
Munesh SharmaPosted Apr 3, 2014, 4:30 AM
the regular expression is
regex rx = new regex("^[a-zA-Z]{2,2}[0-9]{3,3}_[0-9]{3,3}[a-zA-Z{3,3}.xml");
if(rx.ISmatch(textbox1.text))
{
}
else
{
}
sampath mekaPosted Apr 3, 2014, 3:32 AM
kindly help me to write a regex for this
Thank you
sampath mekaPosted Apr 3, 2014, 3:31 AM
kindly help me to write a regex for this
Thank you
Abhay ShankerPosted Apr 3, 2014, 3:08 AM
Munesh SharmaPosted Apr 3, 2014, 2:51 AM