* Add safe regex matching with timeouts and validation * Remove redundant length check * Remove timeouterror workaround