-4

string subject = "Re: Customer request [#11#]";

I want to fetch [#11#] from the above string. At run time instead of 11 there can be any number e.g. 12,13,14 etc.

Please suggest me appropriate Regex to fetch this output.

1 Answers1

-2

Something like this: \[#\d{0,}#\]

You can fiddle with it on https://regex101.com/r/uA8fX9/3

ccalboni
  • 12,120
  • 5
  • 30
  • 38