Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php extract email address from string

<?php 
    $string = 'Ruchika < ruchika@example.com >';
    $pattern = '/[a-z0-9_-+.]+@[a-z0-9-]+.([a-z]{2,4})(?:.[a-z]{2})?/i';
    preg_match_all($pattern, $string, $matches);
    var_dump($matches[0]);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: Cannot use object of type stdClass as array 
Php :: how to get php version in xampp 
Php :: php remove double spaces to single space 
Php :: ternary operator laravel blade 
Php :: laravel remove public from url 
Php :: get country from ip php 
Php :: how login one user with id in laravel 
Php :: php json hjeader 
Php :: file get content using call api in php 
Php :: get parameter in php 
Php :: create array from string with commas php 
Php :: php get intersection of two arrays 
Php :: Call to undefined function mysql_connect() 
Php :: laravel get header from request 
Php :: laravel naming conventions 
Php :: wordpress get category page title 
Php :: php 8 major changes - Nullsafe operator 
Php :: php tags 
Php :: cakephp order by 
Php :: add array to another array in laravel collection 
Php :: php while loop array 
Php :: how to fetch jQuery in wordpress 
Php :: php is daylight savings 
Php :: truncate table laravel eloquent 
Php :: how to display array of img in wordpress 
Php :: add id to route name in laravel blade 
Php :: laravel php 8 ububtu 
Php :: get user avatar wordpress 
Php :: php subtract seconds from datetime 
Php :: PHP | get client ip 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =