Here is the the Mardown text..
.fgfgfdgdfgdfgfg fg.<video controls poster='tempfile://827e9ff4-07ef-f9c1-a4c2-5d4f8fcb5754'><source src='tempfile://d23228e7-a683-befc-724b-96f57f5459e7' type='video/mp4'></video>
In the above string need to replace
 <video controls poster='tempfile://827e9ff4-07ef-f9c1-a4c2-5d4f8fcb5754'><source src='tempfile://d23228e7-a683-befc-724b-96f57f5459e7' type='video/mp4'></video>
with empty using javascript (Replace) regular expression..
 function RemoveContentText(text, link) {
    return text.replace(/(!\[.*?\]\()(.+?)(\))/g, function (whole, a, b, c)  {
        if (whole == link) return '';
        else return whole;
    });
}
Here text is the Mardowntext and link is the string which needs to be replaced by empty..
 
     
     
    