psx
psx

Reputation: 4048

Regular expression to match every occurrence outside brackets?

I have a string:

FROM {oj table1 left outer join table2 on table1.field1 = table2.field1}, table1, table3

How can I match the table1 outside the braces?

Upvotes: 0

Views: 453

Answers (1)

Rezigned
Rezigned

Reputation: 4942

If you only want table1 outside the brackets.

/table1(?=,)/

or

/table1[^\}]+/

Upvotes: 2

Related Questions