Question: I want to submit a score to my leaderboard. Sometimes it works but sometimes i get the error: 

```
Error Code 6: STATUS_NETWORK_ERROR_OPERATION_FAILED

```

I am connected to the internet and enabled multiplayer in the developer console. Any ideas? 

Here is my code:

MainActivity:

```
if(isSignedIn()){
        Games.Leaderboards.submitScoreImmediate(mGoogleApiClient, this.leaderboardId,
                targetScore).setResultCallback(new LeaderBoardSubmitScoreCallback(this));
}

```

LeaderBoardSubmitScoreCallback:

```
@Override
public void onResult(Leaderboards.SubmitScoreResult res) {
    Log.d("mylog","leaderboard upload result "+res.getStatus().getStatusCode()+": "+res.getStatus().getStatusMessage());
    if (res.getStatus().getStatusCode() == 0) {
        activity.showToast(activity.getApplicationContext().getString(R.string.score_submitted));
    }else{
        Toast.makeText(activity.getApplicationContext(),activity.getString(R.string.error)+": "+res.getStatus().getStatusMessage(),Toast.LENGTH_LONG).show();
    }
}

```

Answer: 
Change your regex pattern and work with **match** object(returned by `search` function) in proper way:

```
import re

str = 'Bell St/Oriel Rd (Bellfield (3081))'
result = re.search(r'^(.*?) \((.*?)\)$', str)

print(result.group(1,2))   # ('Bell St/Oriel Rd', 'Bellfield (3081)')

```
This works assuming you don't have any parenthesis prior to the last chunk.

```
var = 'Bell St/Oriel Rd', 'Bellfield (3081)'.split('(')
var[-1] = var[-1][:-1]

```