accept https domain regular expression code example Example: regex to get website name from url /^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)/img