Skip to content

Commit

Permalink
Merge pull request #15 from jhokam/main
Browse files Browse the repository at this point in the history
Add regex network snippets
- Localhost URL
  • Loading branch information
itsbrunodev authored Jan 25, 2025
2 parents 440269a + d914891 commit ae671b6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions snippets/regex/network/localhost.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export const metadata = {
name: "Localhost URL",
description: "Matches a valid localhost URL.",
keywords: ["localhost", "local", "network"],
contributors: ["jhokam"],
};

```regex
(localhost).
```

```sh
# Valid localhost
http://localhost:8080
https://localhost:3000

# Invalid localhost
http://example.com
https://example.com
```

0 comments on commit ae671b6

Please sign in to comment.