I need to clear the whole line where a certain string is found, until the carriage return.
varLineStr="* What a beautiful day\n";
varResultingEmptyLine= preg_replace('/* What[\s\S]+?day\n','',LineStr);
The code below does not work. Any suggestion?
If there is no way of doing this, how could I then delete all characters present between "* What" and the NEXT "*" (assuming that there are many statements in the textbox area as a bulletpoint list with "*").
Clear entire line where string is found JAVASCRIPT
in JavaScript
Posted
I need to clear the whole line where a certain string is found, until the carriage return.
The code below does not work. Any suggestion?
If there is no way of doing this, how could I then delete all characters present between "* What" and the NEXT "*" (assuming that there are many statements in the textbox area as a bulletpoint list with "*").