After thinking about it for a while, I wonder if a RegEx search is needed at all.
The task of the subdomain detection is not to verify the domain view.
The string "hostname" is already verified by the browser window.location.
The detection should split the string and output the partial string by index (can be specified by the user).
This is much faster and more robust with String.split.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Checklist
npm run test
Checklist (for documentation change)
After thinking about it for a while, I wonder if a RegEx search is needed at all. The task of the subdomain detection is not to verify the domain view. The string "hostname" is already verified by the browser window.location. The detection should split the string and output the partial string by index (can be specified by the user). This is much faster and more robust with String.split.
What do you think?