**Input String :**

```
-line[8qWWQ5-swd-WER-DWDS]]<-SUCCESS#[14][MY_SAMPLE_TEST]
-line[8qWWQ5-swd-WER-DWDS]]<-SUCCESS#[4][MY_SAMPLE_TEST2]
-line[8qWWQ5-swd-WER-DWDS]]<Failed#[17][[14]SERVERERROR(TYPE-241)

```

**Expected output :**

```
MY_SAMPLE_TEST
MY_SAMPLE_TEST2
SERVERERROR

```

My regular expression : `(?<=#).*`

The above regular expression I can get everything after # , also I tried :

```
rex = (?<=#\[...\[).*(?=])

```

which gives me correct output for the first line i.e : MY\_SAMPLE\_TEST
but as 2nd line has only one digit i.e 4 so it doesn't matches , similar problem with 3rd line 

It is possible to write a single expression which could give the expected out put ? , Any help would be great