I have a file that contains output from `s3bin sync` in a format as follows

```
Sync: s3://my-bin-url/source/000/000/001.jpg -> s3://my-bin-url/400/x/000/000/001.jpg
Sync: s3://my-bin-url/source/000/000/002.jpg -> s3://my-bin-url/400/x/000/000/002.jpg
Sync: s3://my-bin-url/source/000/000/003.jpg -> s3://my-bin-url/400/x/000/000/003.jpg

```

I wish to end up with a file containing the following

```
000/000/001.jpg
000/000/002.jpg
000/000/003.jpg

```

I am trying to do this using `sed` using the following command. This is contained within a `#!/bin/sh` script, and `$2` corresponds to an absolute file path. This file always exists.

```
sed --in-place --regexp-extended '/.*((?:[0-9]{3}\/){2}[0-9]{3}\.jpg)/\1/gi' $2

```

When I execute the script, I am getting the following error message

```
sed: -e expression #1, char 36: Invalid preceding regular expression

```

Attempts to look up this issue have not yielded any useful responses so far, only suggestions revolve around ensuring the `/` is escaped (which it is) and escaping the `{}` (which only seems to apply when not using `--regexp-extended`