I was wondering, is there any easy way for those who are really unfamiliar with regex to find out how to match a string with the regex format for the specified string?
For example, this string, which is generated from another function i have:
3A5AE0F4-EB22-434E-80C2-273E315CD1B0
I have no clue what so ever what the proper regex for this string is.
Lets say i had a function taking this string as a parameter
public static bool isValidRegex(string inputString)
{
Regex myRegex = ????
if inputstring matches myRegex then
return true;
else
return false;
}
What would the Regex be to make this function return true?
NOTE: As i am unfamiliar with C# the code provided may not be correct at all, and i am aware.
-. Is the length of the groups fixed?