user357034 user357034 - 1 year ago 88
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

Answer Source

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 //
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download