'Visual Studio, collapse/expand all regions with the same name

In Visual Studio you can collapse/expand all regions with Ctrl+M+O / Ctrl+M+L

But is it possible to collapse/expand only regions with the arbitrary name?

#pragma region foo
// some code
#pragma endregion foo comment

#pragma region bar
// some code
#pragma endregion bar comment

#pragma region foo
// some other code
#pragma endregion another foo comment

In example above I want a simpe way to hide region foo leaving region bar shown. I do not want to click each region individually (in real code there are hundreds of regions)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source