条件优先:/ ^([a-zA-Z] {5})(\ d {4})([a-zA-Z] {1})$ /; 条件第二:(/ ^([a-zA-Z]){4}([0-9]){5}([a-zA-Z]){1}?$ / g)
HTML
<input type="text" ng-model="userDetail.id" name="uid" required="" ng-pattern="regx" />
Angular
scope.regx= Condition first or condition Second
scope.regx=/^([a-zA-Z]{5})(\d{4})([a-zA-Z]{1})$/ || /^([a-zA-Z]){4}([0-9]){5}([a-zA-Z]){1}?$/g; not working