Many Thanks In Advance
Hi Every One,
I want to get a string If the Regex IsMatch is TRUE. For Example , Please check below code which I have used,
System.Text.RegularExpressions.Regex re;
str
retVal;
Permission =
new InteropPermission(InteropKind::ClrInterop);
Permission.assert();
re = new System.Text.RegularExpressions.Regex("([0-9])+([a-zA-Z]+[a-zA-Z]+[a-zA-Z]+[a-zA-Z])+([0-9]+[0-9]+[0-9]+[0-9]+ [0-9]+[0-9]+[0-9])+([a-zA-Z])");
str sampleString = “ABCD_SAMPLE_14ABCD1234567B.xml”;
retVal = CLRInterop::getAnyTypeForObject(re.IsMatch(sampleString));
In this Program If the Return value is True or 1, I need to get this value (14ABCD1234567B) as a string.
If anybody knows this, Please help me.
you will be appreciated…
Thanks in Advance…