I have a really complex JavaScript replace regex function and I am wondering is there a way to format the regex code on multiple lines like this:
/
(
    ([0-9]{1,2})
    (\/|\.)
    ([0-9]{1,2})
    (\/|\.)
    ([0-9]{2,4})\s
)?
([0-9]{1,2})
:
([0-9]{1,2})
(
    (:|\s)
    ([0-9]{1,2})
)?
/ig
Also I'd like to ask if there is another way to format regex so it's easier to read.
 
     
     
    