Hello guys,
So I know it's complicated but I would appreciate any insights that any of you can provide.

So, I have such strings which I need to filter the number of grams that an item have.
For example from the string QUAKER OAT COOKIES HONEY NUT 9G => I would like to replace the text with just the integer "9".
Some strings don't include any grams count => so it's fine to drop down.
Thank you in advance.