Regex Expression to keep out but still search for a certain expression


I’m Trying to use matches to search for a number in a text file. I want the number after “Price of GasStation 3” which has a varying number of spaces after between 3 and the number I want. How can I display just the number in UIpath?
I’ve tried \K and look ahead and (?n) which uipath, ignores.
Thank you!


Positive LookBehind should work. Keep in mind that Matches returns an enumerable, which might work in many situations. But you can also put in a Regex directly into an assign with: System.Text.RegularExpressions.Regex.Match(text, pattern).Value // or .Matches()

Using the lookbehind would look like this:

The $ tells it that it will be the end of a line, but you can also swap that out with (.*) probably