What is the name of this solitaire card game?
It sounds like a variant of Push-Pin.


  You can eliminate a card or a pair of adjacent cards between two cards of the same suit or rank. Select a card or a pair of cards you want to discard by clicking on them. The overall effect of successive plays is that length of the layout gets shorter and shorter. If the length is reduced to two cards the game is won.


The differences I see are:


In Push-Pin, you can remove two or one cards between cards of the same rank or suit.
In Push-Pin, if you don't remove all four cards when matching cards between cards of the same rank.
In your game, the cards are flipped in your hand as you go, not all at once, so there's no strategy required.


Since you can remove all four cards, it is possible to eliminate all cards in your described game. As there's no strategy required to "win" (the outcome is predetermined by the order of the cards) I don't think it matters which rule to win you use. ;-)