control the user part of the to header with HMR
Hi!
I need to use HMR to validate the lenght of the user part of the req header, so the number of digits don't exceed 10.
When there are 4-digit prefix + 10 digits on the user part the call should pass.
When there are not 4-digit prefix + 10 digits on the user part, the call should be dropped.
I tought of this regex, but it only matches the prefix+the 10 digits:
^\d{4}\d{10}\b$
And I need to perform the action when happens exactly the opposite (no 10 digits).
is this a good idea?
!(^\d{4}\d{10}\b$)
any othe conditions I should consider (store the value to match against the expression first, for example)