正则表达式匹配括号外的每个事件?

时间:2012-02-01 15:32:15

标签: php regex

我有一个字符串:

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

如何匹配大括号外的table1

1 个答案:

答案 0 :(得分:2)

如果你只想在括号外加table1

/table1(?=,)/

/table1[^\}]+/
相关问题