Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

309
Vistas
Regex to keep all letters in all alphabets along with digits and underscore (problem on hindi letters)

I found out a regex pattern to remove all non alphabet letters: \p{L}

I thus did a regex to remove all non alphabet, non digit and non underscore pattern : /[^\p{L}\d_]/gimu

Unfortunately, it does not work with a hindi character like #फ्रांस which gives फरस

See for yourself here https://regex101.com/r/dnXDK0/1

And please help me :-)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You forgot about diacritics. You need to add \p{M} or \p{Mn} into the negated character class:

/[^\p{L}\p{M}\d_]/gu

See the regex demo.

Note you do not need the i and m flags here. m redefines anchor behavior, but your regex contains no ^ nor $. i makes caseful letters match in a case insensitive way, but \p{L} matches all letters, upper- and lowercase ones.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda