#13 Finializing fix

- Updated the regex to double exclude '\'
- Updated extractValue function to return the full result
This commit is contained in:
Logan Cusano
2024-03-09 17:22:52 -05:00
parent 6ab0ec6d6f
commit 73da7ee2f4
2 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ export const generateUniqueID = () => {
* @returns {string|null} The value found after the pattern, or null if not found.
*/
export const extractValue = (input, pattern) => {
const regex = new RegExp(`${pattern}\\s+(\\S+)`);
const regex = new RegExp(`${pattern}`);
const match = input.match(regex);
return match ? match[1] : null;
return match ? match : null;
};