Fix validation regexes
PR https://github.com/Azure/azure-webjobs-sdk/pull/1188 adds declarative regex validation for Table names, though the regexes no longer match. We need to get them into alignment for Table, and any of the others we move to the new declarative model.
@soninaren created these template regexes I believe, so he may have more insights into their current form and whether the new one in the above referenced PR is correct.
(Nit, #1188 doesn't add a new regex - this is the same regex we've had since v1.0; it just changes how it's invoked).
Here's the problem: In SDK: "^[A-Za-z][A-Za-z0-9]{2,62}$" In Bindings.json: "^[A-Za-z][A-Za-z0-9]{2,62}$|^[{][a-zA-Z0-9]{1,126}[}]$|^[%][a-zA-Z0-9]{1,126}[%]$",
The difference is just that bindings.json is appending additional patterns to support { } and %%.
The binding.json is applied on the raw user input, which still has { } and %% values. But the SDK regex expression is applied after the { } and %% substitution occurs, so it can be simpler.
That said, the { } %% substitution is more complex than described in bindings.json regex. For example, "table{x}{y}" is a legal expression but would be failed by bindings.json.
This is related to https://github.com/Azure/azure-webjobs-sdk-script/issues/1416. We should have a single regex (now in SDK) and portal uses that.
Moving out of sprint 6 since it needs a deeper discussion and possible update to portal and or runtime