I'm trying to create a regex which finds a text that contains :
src.js
and does not contain a question mark '?' at the same time.
For example I want my regex to match :
src="scripts/test.js"
and not match :
src="Servlet?Template=scripts/test.js"
because it contains a question mark sign.
Can anyone give me the appropriate regex?
Thanks a lot
if (str.indexOf('src') !== -1 && str.indexOf('.js') !== -1 && str.indexOf('?') === -1) { ... }.