You need to get the css file name from the link tag, which is located in a specific folder.
<link href="/assets/49f0ugdf8g/sub/style.css" -> style.css
Currently
match(`<link .*?href="\/assets\/(.*?\.css)"/i)
Returns the path minus "/ assets /".
Can it be expanded to remove the rest of the path and just return the file name.
source
share