mirror of https://github.com/VueTubeApp/VueTube
9 lines
339 B
JavaScript
9 lines
339 B
JavaScript
|
// Collection of functions that are useful but non-specific to any particular files
|
||
|
|
||
|
function getBetweenStrings(data, start_string, end_string) {
|
||
|
const regex = new RegExp(`${start_string}(.*?)${end_string}`, "s");
|
||
|
const match = data.match(regex);
|
||
|
return match ? match[1] : undefined;
|
||
|
}
|
||
|
|
||
|
module.exports = { getBetweenStrings };
|