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

240
Views
¿Cómo puedo seleccionar la oración después del último *

Tengo un texto de navegación y seleccionaré la última oración después de *

Ejemplo; Home*Development*Mobil and Web Development

Solo seleccionaré la última oración después de * --> (Mobil and Web Development)

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

Si desea seleccionar Mobil and Web Development del texto, puede usar .split(/[*]+/).pop() .

Manifestación

 var n = "Home*Development*Mobil and Web Development".split(/[*]+/).pop(); console.log(n)

about 4 years ago · Juan Pablo Isaza Report

0

Puedes usar Javascript Regular express para eso

 let chain = "Home*Development*Mobil and Web Development"; let pattern = /.*\*(.*)$/ let matches = chain.match(pattern); console.log(matches[1]);

about 4 years ago · Juan Pablo Isaza Report

0

Suponiendo que lo que desea hacer es un poco de estilo en la 'oración' final, puede ejecutar JS al inicio para encontrar todos los elementos con una clase en particular, separar la parte final y envolverla en un lapso y seleccionar eso:

 const selectLasts = document.querySelectorAll('.selectLast'); selectLasts.forEach(selectLast => { //note there are 'neater' ways of doing this but each step is deliberately spelled out here to show what is going on const text = selectLast.innerHTML; const arr = text.split('*'); const lastText = arr.pop(); selectLast.innerHTML = arr.join('*'); const lastEl = document.createElement('span'); lastEl.innerHTML = '*' + lastText; selectLast.appendChild(lastEl); });
 .selectLast span { background-color: yellow; }
 <div class="selectLast">Home*Development*Mobil and Web Development</div>

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!