JSFiddle - React, Tailwind, and code Playground

by Graham Fairweather

JavaScript

var url = "http://stackoverflow.com/questions/16449482/check-to-see-a-url-contains-a-certain-character-how-many-times";

console.log(url.replace(/[^\/]/g, "").length);