Skip to content
Advertisement

Extract email address from string – php

I want to extract email address from a string, for example:

JavaScript

From the above string I only want to get email address ruchika@example.com.

Kindly, recommend how to achieve this.

Advertisement

Answer

Try this

JavaScript

see demo here

Second method

JavaScript

See demo here

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement