Its quite a simple but in my opinion weird problem i basically have this regex and entered a few tests and they work.
(?=^\*)|(?=^.{1,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-\{\}]{1,63}\.?)+(?:[a-zA-Z\{\}]{1,})$)
https://regex101.com/r/hU6tP0/2
But when i try to use it in html it fails. But if i test it in javascript it works.
http://jsfiddle.net/ek6kby2q/9/
I don't have much knowledge at all about regex so maybe anyone know whats going wrong or got any tips to make the regex better is welcome.