Revert "Revert "Adding regx to get component""

This reverts commit c5ee2119ea7a9f743efff5a21d66f19359bd10be.