Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

296
Views
Cómo usar Regex para romper la línea después de la coma

Necesito romper la línea después de la coma usando expresiones regulares (otro método también es bienvenido)

 function breakLineAfterComma(){ let Text = "This is an Example. Break Line Here" Text.replace('regex here') return Text; }
about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

Puede usar String.replace para reemplazar todos los puntos y un espacio con una nueva línea:

 function breakLineAfterComma(){ let Text = "This is an Example. Break Line Here. Break Line Here" return Text.replace(/\. /g, "\n"); } console.log(breakLineAfterComma())

También puede usar String.replaceAll :

 function breakLineAfterComma(){ let Text = "This is an Example. Break Line Here. Break Line Here" return Text.replaceAll(". ", "\n"); } console.log(breakLineAfterComma())

about 4 years ago · Juan Pablo Isaza Report

0

es posible usar expresiones regulares y reemplazar "." con un descanso

aquí está el ejemplo de función reutilizable

 function breakLineAfterComma(text){ return text.replace(/\./g, '\n'); } const content = "This is an Example. Break Line Here" const a = breakLineAfterComma(content); console.log(a);
about 4 years ago · Juan Pablo Isaza Report

0

function splitText(text){ text = "This is an Example. Break Line Here"; return text.split('. ').join('.\n'); // This is an Example. // Break Line Here }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!