Code for extracting field-like text from unformatted strings.
Note: The fields must be specified in order. The text is case-sensitive.
source = "Product: My product Price: 45 Qty: 3"
fields = ["Product:", "Price:", "Qty:"]
values = getFieldIValues(source, fields);
console.log(values);