I don't think these can be in the same rule, the prefixing is applied on the bridge action, before the regex capture ($1) and not part of the regex itself.
One rule selecting 7 digits with a prefix, and another with 11 digits and no prefix should do it. You may have to pay attention to the ordering if any other rules match your 7 digit regex.