Finding network patterns