Odys Odys - 1 year ago 81
jQuery Question

Get text from character and after using jQuery

I want to get the text from a string after the occurrence of a specific character.

Lets say: texttexttext#abc
And I want to get abc

How is this done in jquery?
(This might be trivial to somebody, but I have little exp in jQuery)

Answer Source

you could do:

var text =  'texttexttext#abc';
var abc = text.substring(text.indexOf('#') +1);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download