7

I have a javascript file with millions of lines. The problem is that IE doesn't support , (comma) followed by } (curly close bracket).

In Notepad++ I'm able to find all the commas which are being followed by a curly close bracket, by using this regular expression: \,.*\}.

But when the comma and the curly close bracket are not in the same line, the regex doesn't match it:

somestring,

    }

3 Answers 3

8

All you need to do is check . matches newline in Notepad++ Search/Replace Search Mode:

enter image description here

This will make the dot . in your regex match newline, so .* will match any number of newlines.

3

The problem is in notepad version. Updated to notepad++ v6.1.8 and this regular expression worked \,[\r\n\s]*\}

1

I had a similar problem, I tested this out using the following and got it to work:

REPLACE - ,\r\n\r\n\s+}
WITH - ‹blank›

NOTE: In my Replace tab I have "Wrap around" checked with Search Mode set to "Regular Expression" and I am using Notepad++ v6.4.3.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .