Odys Odys - 3 months ago 6x
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)


you could do:

var text =  'texttexttext#abc';
var abc = text.substring(text.indexOf('#') +1);