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

234
Vistas
Find string in string and return a substring (Zapier)

I have a string like "localhost,GEWTESTID" or "GEWTESTID,localhost,somethingelse" etc.

Now I would like as an output = GEWTESTID

The string is always starts with "GEW" and 6 chars are following.

So what I need:

  1. Find GEW
  2. Find the next 6 chars (after GEW) (or go to next seperator = ",")
  3. Output (1+2) = GEWTESTID

This I need working for Zapier Javascript code.

Thank you very much!

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

We can try using string match() here with the pattern \bGEW.{0,6}\b:

var inputs = ["localhost,GEWTESTID", "GEWTESTID,localhost,somethingelse"];
inputs.forEach(x => console.log(x + " => " + x.match(/\bGEW.{0,6}\b/)[0]));

To extract the Zapier substring, use:

var input = "localhost,GEWTESTID";
var zapier = input.match(/\bGEW.{0,6}\b/)[0];
about 4 years ago · Santiago Gelvez 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