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

255
Views
C#: ¿cómo encontrar y reemplazar cada enésima aparición de caracteres usando expresiones regulares? Conversión de Javascript a C#

Encuentre y reemplace cada tercer carácter en una cadena determinada y reemplácelo con H

Encontré este código Javascript que hace lo mismo y me gustaría convertirlo en un código C#. ¿Puedes por favor ayudar?

Encontrado aquí

 str = str.replace(/((?:[^x]*x){2}[^x]*)x/g, '$1y'); let str = 'I amx nexver axt hoxme on Sxundxaxs'; let n = 3; let ch = 'x'; let regex = new RegExp("((?:[^" +ch+ "]*" +ch+ "){" + (n-1) + "}[^" +ch+ "]*)" +ch, "g"); str = str.replace(regex, '$1y'); console.log(str); //=> I amx nexver ayt hoxme on Sxundyaxs
about 4 years ago · Juan Pablo Isaza
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!