How can I check if a given string is a valid URL address in the following format:

**jsfiddle.net/test/wLrk94mp**

* If a user prefixes the URL with **https://** or **http://** or **http://www** I'd like to remove it
* If a user adds a trailing slash to the end of the URL i.e. *jsfiddle.net/test/wLrk94mp/*, I'd like to remove it.

Here's my line of thinking so far (pseudocode):

1. Check if jsfiddle.net exists in the string with `indexOf('jsfiddle.net')`
2. Remove any URL prefixes
3. Remove any trailing slashes
4. Check if string can be split into 3 parts (jsfiddle, test, wLrk94mp)
5. If 1-4 are met then it is a good URL, if not then fail with error

Is there a way of approaching this with regex may as a one-liner, or should I stick with the linear step by step approach as above?