Here is the example string which I have to match:

```
   var sampleStr = "aaa[bbb=55,zzz=ddd],#ddd[ppp=33,kk=77,rr=fff],tt,ff";

```

I need to write regex that will match all `,` characters which is not inside `[` `]`

so In my sample string I should receive the next `,` characters:

```
   - `,` before `#ddd`
   - `,` before `tt`
   - `,` before `ff`

```

and it should ignore next `,`:

```
  - `,` before `zzz`
  - `,` before `kk`
  - `,` before `rr`

```

Actually I have no idea how to ignore those `,` inside `[...]`.
Big thx for any advance