I would like to regex the fullpath of the css, for example I have this:
<link rel="stylesheet" href="../assets/myCssFile.css"/>
I would like to regex: /assets/myCssFile.css
What I tried is this: /(?:href)=("|').*?([\w.]+\.(?:css))\1/gi
but this returns me this: href="../assets/myCssFile.css"
Can someone help me out with the regex.
BTW: It is an response text of an ajax request which returns me a string of the html page
el.hrefshould give you the necessary path.href="([^"]*\.css)". Then benefit from first capturing group.