javascript replace <br> with n
var str = $("#mydiv").html();
var regex = /<br\s*[\/]?>/gi;
$("#mydiv").html(str.replace(regex, "\n"));
Also in JavaScript:
- how to get value inside span using javascript
- react native pure component vs component
- loopback UserModel.setter.password overwrite
- javascript uppercase string
- js array
- jquery datepicker on multiple input fields
- send message to specific channel discord.js
- npm ERR! Unexpected end of JSON input while parsing near '...rity":"sha512-o7nOSN0
- regex special characters javascript
- json file undefined
- async axios call
- update one component from another component angular 9
- javascript select audio device
- jquery visible
- export aab react native
- how to add okta api to vuejs
- javascript check if undefined or null
- send file discord.js
- javascript moeda reais
- js array add element
- jquery loop through array
- javascript reverse array without modifying
- react map array limit
- math.min