Skip to content

Commit 5006e28

Browse files
committed
update regex for as-org2info file matching
- replace fixed 8-character wildcard with \d{8} for date format matching - ensure compatibility with as-org2info file naming convention
1 parent e9f8ba9 commit 5006e28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datasets/as2org.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ impl As2org {
460460
}
461461

462462
pub fn get_most_recent_data() -> Result<String> {
463-
let data_link: Regex = Regex::new(r".*(........\.as-org2info\.jsonl\.gz).*")
463+
let data_link: Regex = Regex::new(r".*(\d{8}\.as-org2info\.jsonl\.gz).*")
464464
.map_err(|e| anyhow!("Failed to create regex: {}", e))?;
465465
let content = ureq::get("https://publicdata.caida.org/datasets/as-organizations/")
466466
.call()

0 commit comments

Comments
 (0)