If I have the line "Abc: Lorem ipsum sit amet", how can I use javascript / jQuery to delete the line before ":", including ":". For example, the line above would become: "Lorem ipsum sit amet".
There is no need for jQuery, normal JavaScript will do:
var str = "Abc: Lorem ipsum sit amet"; str = str.substring(str.indexOf(":") + 1);
Here you can test it . Or .split() and .pop() :
.split()
.pop()
var str = "Abc: Lorem ipsum sit amet"; str = str.split(":").pop();
You can test this version here . Or, a regex version (several variations of this):
var str = "Abc: Lorem ipsum sit amet"; str = /:(.+)/.exec(str)[1];
You can check it out here .