Validate single hypen in the middle : I have the following regex to test if characters input is capital letter and number only

    const isCapitalLetters = value => /^[A-Z]/.test(value);

How do I test if I want to allow only single hypen can be enter in the middle of the string and not at the end of beginning. For your information the above regex does not allow special characters at all