Sankara
Sankara

Reputation: 1479

RegEx find and replace

I have 18 MB data script file where i have to find string like this replace with empty string in NotePad++

(1,
(2,
(3,
....
(312456

total # of records are 312456. start string will have "(" and end string will be first comma(,) in the file. I tried something like this ^([\d*]$ I am no way near to the right expression

Here is sample data

VALUES (1, 258, N'somedataaa', N'000010000001', N'', N'', N'', N'', getdate())

it should be after replacement like this

VALUES (258, N'somedataaa', N'000010000001', N'', N'', N'', N'', getdate())

Upvotes: 1

Views: 74

Answers (1)

Jerry
Jerry

Reputation: 71538

Try using:

^\(\d+,$

For find and nothing for the replace?

EDIT: As per update, try using this:

(?<=\()\d+,\s*

And replace with nothing.

Upvotes: 2

Related Questions