Javascript – How to get the preceding characters of a given string?
I am creating a scraper in Node JS and I want it to look for all .css files. I'm passing the HTML of the page as a string and simply using indexOf() to look for instances of .css, eg: const…