Rmela Posted April 16, 2020 Share Posted April 16, 2020 I need to clear the whole line where a certain string is found, until the carriage return. var LineStr = "* What a beautiful day\n"; var ResultingEmptyLine = 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 "*"). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now