aboutsummaryrefslogtreecommitdiff
path: root/src/extractor.rs
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2024-06-05 19:10:30 +0300
committeromagdy7 <omar.professional8777@gmail.com>2024-06-05 19:10:30 +0300
commit07c54da628ec776627e68c25196539389c8d965c (patch)
tree30255789673c09d4a74e8372796f8ba4988cf4f4 /src/extractor.rs
parentff75fa542a98cf9a79133a81b7716401e717bfd6 (diff)
downloadtiny-server-07c54da628ec776627e68c25196539389c8d965c.tar.xz
tiny-server-07c54da628ec776627e68c25196539389c8d965c.zip
codecrafters submit [skip ci]
Diffstat (limited to 'src/extractor.rs')
-rw-r--r--src/extractor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extractor.rs b/src/extractor.rs
index edc7b2e..9b53215 100644
--- a/src/extractor.rs
+++ b/src/extractor.rs
@@ -6,7 +6,7 @@ pub fn build_regex_from_path(path_template: &str) -> Regex {
for component in path_template.split('/') {
if component.starts_with(':') {
// Replace placeholder with regex to capture alphanumeric, underscores, or hyphens
- regex_string.push_str("/([a-zA-Z0-9_-]+)");
+ regex_string.push_str("/([a-zA-Z0-9_.-]+)");
} else if !component.is_empty() {
// Escape and add literal components to the regex
regex_string.push('/');