97 7

Remove part of a string before specified character

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
//remove string before '&' if want to include character '&' then 'indexOf("&") + 0' var str = "black&white"; str = str.substring(str.indexOf("&") + 1); //or use regex var str = "black&white"; str = /&(.+)/.exec(str)[1]; // or use .split() and .pop() var str = "black&white"; str = str.split("&").pop();
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus