I know there are some answers that help converting negative lookbehind in regex for JS engines prior to ECMA 2018. However, I can't seem to use these hints against my specific regex.
One of these answers: javascript regex - look behind alternative?
Here is the original regex (it's my registrar's domain name acceptance regex) :
^((?!-)[-a-z0-9]{1,63}(?<!-)\.)+(?=.{1,63}$)(?!-)([-a-z0-9]*[a-z][-a-z0-9]*\.?)(?<!-)$
How should I use the combination of supported features in current JS (browsers as of early 2018) to achieve this behaviour?
Thank you.