I have lines like this one:

```
 Test, Customer Relationship (CR), 4D-, 1D-, 3D-magnetic (circuit, simulation) Edyson, test

```

In these lines, I want to match every comma (,) with some exceptions: I don't want to match a comma preceeded by a minus (-,) or if it inside Brackets (... , ...).

So in the example line, only the first, the second, and the last comma should be a match.

I know how to match comma not preceeded by a minus:

```
(?<!\-)\,

```

But I don't know how to match only commas that are not between brackets, and I don't know how to combine the rules.

Can this be done in regex? Thanks!