My knowledge of RegEx is limited, but I'm trying to make the following expression work with Javascript/Typescript:
/^({)?(?(1)|(\()?)[0-9A-F]{8}(-)?([0-9A-F]{4}(?(3)-)){3}[0-9A-F]{12}(?(1)}|(?(2)\)))$/i
This RegEx is used to check if a string is a valid GUID (in any correct form), as explained here: . While it works for Python and PHP, it doesn't fully support conditionals in Javascript. How would you modify it to be compatible with Javascript?
You can test the expression here: https://regex101.com/r/rosi2k/1/tests