Localhost URL

Matches a valid localhost URL.

Contributed by @jhokam

regex
(localhost).
sh
# Valid localhost
http://localhost:8080
https://localhost:3000
 
# Invalid localhost
http://example.com
https://example.com
GitHubEdit on GitHub