the browser will report an error when using the following rules.
<input pattern="^https?:\/\/([a-zA-Z0-9\-]+\.)+([a-zA-Z]{2,5})([\/\?-sharp][a-zA-Z0-9`~!@-sharp%&_=;\$\^\*\(\)\-\+\{\}\[\]\:\,\.\?\/\|]*)?$"
onblur="inspectValidity(this)" name="url" type="text" required />
``
:
> Pattern attribute value ^https?:\/\/([a-zA-Z0-9\-]+\.)+([a-zA-Z]{2,5})([\/\?-sharp][a-zA-Z0-9`~!@-sharp%&_=;\$\^\*\(\)\-\+\{\}\[\]\:\,\.\?\/\|]*)?$ is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /^https?:\/\/([a-zA-Z0-9\-]+\.)+([a-zA-Z]{2,5})([\/\?-sharp][a-zA-Z0-9`~!@-sharp%&_=;\$\^\*\(\)\-\+\{\}\[\]\:\,\.\?\/\|]*)?$/: Invalid escape
< input type= "text" pattern= "[1-9] d {5} (?! d)" onblur= "inspectValidity (this)" name= "code" required / >