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

192
Vistas
I need to match regex in javascript and ui5, or php?

I have some lengthy regex and I keep getting an error in ui5 webide and javascript using the replace function. I tried it in php using preg_replace and nothing happened. I am trying to remove the phone numbers and emails from the string "Feedback. (709)875-2711, 1(709)875-2711, uddalok.biswas@gmail.com hello.". Do I need to escape something? In php I am

Here is my regex for javascript and u5

/^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$/g
/^\S+@\S+$/g
/^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$/g
/(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$/g

Here is my regex for php

'/^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$/'
'/^\S+@\S+$/'
'/^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$/'
'/(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$/'

The regex isn't doing anything in php and in ui5 controller I am using replace and getting an error unexpected token.

The expected result is the regex will match with phone numbers and emails in a large string either in php or javascript.

about 4 years ago · Juan Pablo Isaza
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