Reputation: 1264
Hi I got about a 1000 lines of data, what I need to do is using regular expression mode on visual code to find "),(" and replace with a new line after the comment. Is this possible, below is an example of what im trying to achieve.
(test, null, null, 1),(test1, null, null, 2)
into
(test, null, null, 1),
(test1, null, null, 2)
Upvotes: 2
Views: 5302
Reputation: 967
Search:
\([^\)]*\),
\(
, \)
and ,
are literals
[^\)]*
matches all characters which are not an )
Replace:
$0\n
$0
is the back reference for the whole match
$x
(e.g. $1
) would be the back reference for a group marked by (
and )
, but is not required here as kennytm pointed out
\n
is a newline
Upvotes: 6