Regular expression for remove empty tags except <script src="myjs.js"></script> : Can anyone help me with a javascript regular expression that remove all empty tags except script tag? I have tried the following expression, It removes script tags also.

    var regex = new RegExp(/<([^\s>]+)[^>]*>\s*<\/\1>/gi);