I tried this once before. I took it down by "solving it", but it was not solved. It was a hot mess. I now better understand what I need.
I need to extract the dollar value of the string value that is immediately N characters from the word "awarded." The string value will be >$1,000,000. The text may include other values, but I only want to extract the first string value immediately N characters from "awarded."
I do not know how to adjust for the variability in the number of characters or in the value of the award nor how to convert it to a dollar value from a string.
I know it has to start. ^.*\bawarded\s. ...
Examples
Lorem ipsum dolor sit amet, consectetur adipiscing awarded an $8,069,336 elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Augue eget arcu dictum varius duis at consectetur lorem donec. Nunc scelerisque viverra mauris $28,069,336 in aliquam sem fringilla.
OR something like this
Lorem ipsum dolor sit amet, consectetur adipiscing awarded to my best friend $9,998,069,336 elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Augue eget arcu dictum varius duis at consectetur lorem donec. Nunc scelerisque viverra mauris $28,069,336 in aliquam sem fringilla.
THANKS!
Solved! Go to Solution.
I like where you are going with this approach. But, I ran into a snag when I tested it out using regex101.com. It does not seem to be locking onto the first awarded value pair.
It works -- nice and simple. Thanks.