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:



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.

| improve this answer | |

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

| improve this answer | |

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.