Something maybe wrong with my regular expression (maybe it's looping too much) I think it causes the MVC (C#) web app to timeout as well...
The regEx is:
public const string UrlPartPost = @"^([0-9a-zA-Z-/]*){1,256}$";
I use it like this:
Regex.Match(urlPart3, RegExKeys.UrlPartPost, RegexOptions.IgnoreCase).Success
I added a live test - which is also timing out: https://regex101.com/r/vZ0lN5/1
this is fine: test1-test2-test3-test4-test5
this times out: test1-test2-test3-test4-test_5
How can I fix it so it does not time out?
UPDATE: What is the "*" supposed to do exactly?
[\da-zA-Z-/]+
or[0-9a-zA-Z-/]{1,256}
– Tim007