how to replace line break in JavaScript with regular expression
Code:
var data = "Azhar\nTechno\nCoder"
//Scenario1
var outputComma = data.replace(/\r?\n/gm,",")
console.log(outputComma)
//Scenario2
var outputEnter = data.replace(/\r?\n/gm,"\n")
console.log(outputEnter)
Chapters:
0:00 - Introduction to the video
0:23 - Procedure to replace line break in JavaScript with regular expression
3:09 - End Tags and subscription to the channel
My second Channel:
WrestleTalkByAzhar - / wrestletalkbyazhar
Follow Insta:
/ kingazharjamal
/ fari_digi
One Card App Link to Apply:
https://1cardapp.page.link/88LF
Cred App Link to Apply:
https://app.cred.club/spQx/ud86uunq
Next Steps :
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists
► 1. Javascript - • Javascript Factory
► 2. Puppetter - • Puppeteer
► 3. Cypress - • Cypress
► 4. Tech works - • Video
► 5. Vbscript Basics To Advanced - • VBScript Part 1 - Features Advantage...
► 6. Jmeter - • Jmeter Tutorials
► 7. Excel - • Videos On Excel
► 8. Appium - • Appium
► 9. Shares - • Shares
► 10. Javascript Interview Questions - • Javascript Interview Questions
► 11. C# Tutorials - • C# Factory
► 12. HTML & CSS - • HTML & CSS
► 13. Browser Console - • Browser Console
► 14. JSON - • Videos on Json
► 15. Specflow - • Specflow Tutorials
► 16. MongoDB - • MongoDB Tutorials
► 17. Postman - • Postman
► 18. Python - • Python
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
#javascript
#regularexpression
#linebreaks