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

162
Vistas
Remove all Right to Left Characters in discord.js leaderboard

Hello there I just wanted to ask if there is a way to remove all right-to-left characters. I am aware of .replace(/\u200f/g, "") and .replace(/[^\x00-\x7F]/g, "") but they have not really helped with my leaderboards since the former still doesn't remove the rtl characters and the latter only removes all non-ascii characters which also involves characters that aren't written from left to right. if there was a possible fix for replacing all characters from languages that are read from right to left, i would be very grateful

Here is the sample input

acc.tag.replace(/\u200f/g, "")

and here is the sample output

 1. PersonA#1333 - 8052.7x
 2. PersonB#3169 - 8035.3x
 3. PersonC#7619 - 7541x
PersonD#7797 - 7529.5x.𞠔𞠔 4

or when I do .replace(/[^\x00-\x7F]/g, "") it outputs the following(sample):

 4. PersonA#1333 - 8052.7x
 5. PersonB#3169 - 8035.3x
 6. PersonC#7619 - 7541x
 4. #4327 - 6553.4x

in the above scenario, it replaced 𝐁𝐫𝟎𝐰𝐧𝐏𝟑𝐚𝐜𝐡 as "" since it consists of non ASCII characters but its not a rtl text.

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

0

I think you're looking for this RegExp /[\u04c7-\u0591\u05D0-\u05EA\u05F0-\u05F4\u0600-\u06FF]/gi.

It matches both Hebrew and Arabic, and doesn't match Emojis or special non-RTL Unicode characters. See the regexr tests here

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