user357034 user357034 - 3 months ago 7x
Javascript Question

get all characters after "," character

Need a Regex to get all characters after

(not including it) from a variable. This variable can contain for example


Note: There can be any length of characters after the
in this variable.

An explanation of the regexp would be a added help for the novice :)

Edit: a javascript answer would be just as good


You don't need regex to do this. Here's an example :

var str = "'SELECT___100E___7',24";
var afterComma = str.substr(str.indexOf(",") + 1); // Contains 24 //