How I can get the value after last char(. ; + _ etc.): e.g.
string.name+org.com
I want to get "com". Is there any function in jQuery?
Use lastIndexOf
and substr
to find the character and get the part of the string after it:
var extension = name.substr(name.lastIndexOf(".") + 1);
Demo: http://jsfiddle.net/Guffa/K3BWn/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With