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

164
Vistas
Regex (Javascript) - How to replace certain character in a given string

I have the following case:

"SUM(A, SUM(A1, B, C), SUM(D, A3, F, M))"

Is there I way I could identify all the cells/columns which are the following letters:

Cells: A1, B1, C1, ... Columns: A, B, C, D, ...

COLUMNS are only A-Z

CELLS are [A-Z][1-*]

And replace only them & NOT replace any formula letter (i.e: SUM, AVERAGE, ...).

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

0

If I'm understanding correctly, the goal is basically to avoid ending up replacing the formula letters.

Assuming you're able to use negative lookaheads, that could be done as simply as \b[A-Z]+[0-9]*\b(?!\(), since a formula will always be the letters followed by an open parenthesis.

Or, if you're positive there aren't more than 26 columns, then you could shorten it even more with \b[A-Z][0-9]*\b(?!\(). That is, removing the quantifier for the letter.

If there's some other constraint that would make this not work, then it would be helpful to have that information available in the question.

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