OK, so your real question is:
How can I match an element, optionally preceding the quantity, but only if there is nothing left or a space before the match?
Using
(?<!\S)\b(?:\d+\s*x\s*)?\d+(?:\.\d+)?\s*ml\b
Explanation
(?<!\S): Claim that it is not possible to match a non-spatial character before a match.
\b: match the word boundary
(?:\d+\s*x\s*)?: optionally a quantifier (integers only)
\d+(?:\.\d+)?: ( )
\s*ml\b: ml, .