function extractFieldId(inputString: string) {
	const match = inputString.match(/\[([^\]]+)]/);
	return match?.[1];
}

// Example Usage:
// const input = "form_fields[field_d90458e]";
// const fieldId = extractFieldId(input);
//
// if (fieldId) {
// 	console.log(`Extracted ID: ${fieldId}`); // Outputs: field_d90458e
// } else {
// 	console.log("No ID found in the input string.");
// }

export default extractFieldId;
