javascript - Split the string using regex -
this question has answer here:
- how remove <br /> tags , more string? 6 answers
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 :
>([^<]*?)< this regex use negated character classes match thing between > , < except <.
Comments
Post a Comment