Regex: Extract all numbers or Dashes after text

Hi

For confidentiality reasons, I can’t show my exact text. But the idea is that I want extract all the numbers (which can be in brackets) or dashes after some text.

But the text may contain text & number in brackets too.

Eg 1
Revenue (q4) - 2000
Ans: - 2000

Eg 2
Revenue (4q) (1500) 2000
Ans: (1500) 2000

Eg 3
Revenue (1500) 2000
Ans: (1500) 2000

I tried the below, but doesn’t work. There are “*” after each dot but it is not showing below. Thank you

Trim(System.Text.RegularExpressions.Regex.Match(item,“(?<=(Revenue).((\d.\w.\d.)){0,1}.)(-\s|-|(\d|\d).*”).Value)

Hi

I tried the below too. So one of option for the parsed text is d*(^)). Digits not followed by a “)”. But it is not working. Thanks

Trim(System.Text.RegularExpressions.Regex.Match(item,“(?<=Revenue.)(-\s|-|(\d)|\d*(^))).*”).Value)

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(text,"(?<=Revenue.*?)(\(\d+\)|-)?\s\d+").Value.Trim

Regards,