How can we extract string ‘abc.com ‘ from a string
info@abc.com" target="_blank">http://info@abc.com using
regular expression of php?
Answer Posted / ankush prasad
<?php
$string1="info@abc.com";
$string2=preg_match("/[a-c]+.[c-o]+/",$string1,$a);
print $a[0];
?>
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Is PHP an open source software?
Does php have a future?
How to include variables in double-quoted strings?
What is the best way to change the key without changing the value of a php array element?
How can you tell if a number is even or odd without using any condition or loop?
Write a select query that will be displayed the duplicated site name and how many times it is duplicated?
Explain about the $_GET variable of PHP?
How do you trim spaces in excel?
What is the use of strip_tags() method?
What is difference between base_url and site_url?
Why sessions are used in php?
Do you know design patterns. List few?
What is session and Cokkies . How it works . tell some thing about Session_id()
How to download and install php for windows?
Explain the difference between mysql_connect and mysql_pconnect?