MCPcopy Create free account
hub / github.com/Eltaurus-Lt/CourseDump2022 / extractNumericValue

Function extractNumericValue

menu.js:108–113  ·  view source on GitHub ↗
(string, key)

Source from the content-addressed store, hash-verified

106}
107
108function extractNumericValue(string, key) {
109 const regex = new RegExp(`${key}(\\d+)`);
110 const match = string.match(regex);
111
112 return match ? match[1] : "";
113}
114
115function getDomainAndId(url) {
116 const cid = extractNumericValue(url, "course_id=") ||

Callers 1

getDomainAndIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected