javascript - Split the string using regex -


this question has answer here:

i have innertext

<div contenteditable="true">   hi</br>   multiple line</br>   code </div> 

i want make single line , instead of
take space , split comma.. tried stextbox.split(/[\s,]+/); include new line please suggest me solve problem

updated expected output : hi multipleline code.. have calculate stextboxsplit[stextboxsplit.length - 1] , gives stextboxsplit = ["hi", "this", "is", "multiple","line","code" ""], , in give "" last index last index code. want work in c# mvc..

you can use following regex :

>([^<]*?)< 

demo

this regex use negated character classes match thing between > , < except <.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -