Let's say I have the below test data
Home$Fruits
Home$Fruits$Apple
Home$Fruits$Apple$Red-Apple
Home$Fruits$Apple$Green-Apple
Home$Fruits$Banana$Yellow-Banana
Home$Fruits$Banana$Green-Banana
Home$Fruits$Orange
I want to match those lines that has $ symbol exactly 2 times (or exactly 'n' times). What would be the possible regex?
Any help is really appreciated.