JSFiddle - React, Tailwind, and code Playground

by seamuskc

JavaScript

var p = '/path/to/some/test.txt';
var filename = p.replace(/^.*[\\\/]/, '');
Console.log(filename);