Split string on first instance of character
var foo = 'hello_world';
var bar = foo.split(/_(.+)?/)[1] bar[0]: hello bar[1]: world
Library of HTML, CSS, PHP, SQL, JavaScript & jQuery Code Snippets
var foo = 'hello_world';
var bar = foo.split(/_(.+)?/)[1] bar[0]: hello bar[1]: world