Java regex : matching a char except when preceded by another char

前端 未结 1 594
不思量自难忘°
不思量自难忘° 2020-12-07 01:53

I\'m trying to use String.Split() to split a query, in that case a HiveQL query.

The case I have is I want to split along ; except when that ;

1条回答
  •  春和景丽
    2020-12-07 02:24

    You need a negative lookbehind for that:

    String.Split("(?

    Here is a demo on ideone.

    0 讨论(0)
提交回复
热议问题