Regex extensions - siof/common.extensions GitHub Wiki

Regex extensions

IsValidRegex

bool IsValidRegex(this string pattern)

Checks if given pattern is valid regex. Checking is done in very simple way and will return false if:

In any other case this function will return true.