Skip to content

Commit

Permalink
Loosen up the domain regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Antony1060 committed Feb 23, 2024
1 parent dddffd6 commit 23532a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/src/patterns/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use regex::Regex;

lazy_static! {
// Not exact but rough enough for now.
static ref DOMAIN_REGEX: Regex = Regex::new(r"^[a-zA-Z0-9][a-zA-Z0-9-.]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}$").unwrap();
static ref DOMAIN_REGEX: Regex = Regex::new(r"^(?:[^.]+\.)+[a-zA-Z]{2,}$").unwrap();

static ref ADDRESS_REGEX: Regex = Regex::new(r"^0x[a-fA-F0-9]{40}$").unwrap();
}
Expand Down

0 comments on commit 23532a6

Please sign in to comment.