β
Always learning
Pinned Loading
-
-
WebDesign3-DHBW/Next-level-ai-experience
WebDesign3-DHBW/Next-level-ai-experience PublicMuch wow Web Deisgn π¦
-
webanwendung-on18/effective-octo-waffle
webanwendung-on18/effective-octo-waffle Public -
-
Transform every <br> inside paragrap...
Transform every <br> inside paragraph to \n and remove every other <br> 1const str = `<br><h1>Test test test</h1><br><br><p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. <br>HIER IST DER BREAK Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p><br><p>Test <br> test test test</p>`;
2const regex = /(<p>(?:.|\n)+?)(?:(<br(?: | \/|\/)?>)(?:\b|\n\b| \b))((?:.|\n)+?<\/p>)/gi
34//change every <br> inside paragraph into \n
5// (?: ) -> Non caputuring groups (I only neeed 3 groups: befor <br>, <br> and after <br>)
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.