#13 Finializing fix
- Updated the regex to double exclude '\' - Updated extractValue function to return the full result
This commit is contained in:
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user