What's the difference between this regex: /(everything|cool)/gi and this one: /(?:everything|cool)/gi ?
I'm asking this because I've got an regex which I wasn't able to write myself* and there are, as you can see below, a lot of ?: in that regex. I've read somewhere that ?: is bad for performance so I want to remove it.Can I remove it or is it important for anything?
* (?:(?=(?:(?:\\.|"(?:\\.|[^"\\])*"|[^\\'"])*'(?:\\.|"(?:\\.|[^"'\\])*"|[^\\'])*')*(?:\\.|"(?:\\.|[^"\\])*"|[^\\'])*$)(?=(?:(?:\\.|'(?:\\.|[^'\\])*'|[^\\'"])*"(?:\\.|'(?:\\.|[^'"\\])*'|[^\\"])*")*(?:\\.|'(?:\\.|[^'\\])*'|[^\\"])*$)(?:\\.|[^\\'"]))+