mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
11 lines
234 B
TypeScript
11 lines
234 B
TypeScript
export const extractLabelValue = (input: string, label: string) => {
|
|
const pattern = new RegExp(`${label}: (.*?)\n`);
|
|
const match = pattern.exec(input);
|
|
|
|
if (match && match[1]) {
|
|
return match[1].trim();
|
|
}
|
|
|
|
return "";
|
|
};
|