Reputation: 3610
My Tooltip :
var ToolTip ="\nFilling :MLB\nInlay/onlay :BOL\nCaries :FIL";
the \n
in the string makes the string to shift to new line:
I want than when i find string Filling
a want to delete whole line ie \nFilling :MLB
I can find the string by using indexOf
but how to delete the whole line
Upvotes: 0
Views: 81
Reputation: 388316
Try
var ToolTip ="\nFilling :MLB\nInlay/onlay :BOL\nCaries :FIL";
ToolTip = ToolTip.replace(/\nFilling.*?\n/, '')
Upvotes: 3