JSFiddle - React, Tailwind, and code Playground

by mischa

JavaScript

var s = '/images/[email protected]',
r = /\/images\//,
type = s.match(/\/(.+)\//)[1];
document.write("Returned value: " + type);