Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can we extract string ‘abc.com ‘ from a string
info@abc.com" target="_blank">http://info@abc.com using
regular expression of php?

Answers were Sorted based on User's Feedback



How can we extract string ‘abc.com ‘ from a string info@abc.com" target="_blank"..

Answer / simlu_irtt

$string1="info@abc.com";
$string2=split("@",$string1);
print_r($string2);

this code print the string as abc.com

Is This Answer Correct ?    23 Yes 6 No

How can we extract string ‘abc.com ‘ from a string info@abc.com" target="_blank"..

Answer / simlu_irtt

$string1="info@abc.com";
$string2=split("@",$string1);
print_r($string2);

this code print the string as abc.com

Is This Answer Correct ?    6 Yes 2 No

How can we extract string ‘abc.com ‘ from a string info@abc.com" target="_blank"..

Answer / 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

How can we extract string ‘abc.com ‘ from a string info@abc.com" target="_blank"..

Answer / harsh

$string1="info@abc.com";
$string2=split("@",$string1);
print_r($string2);

Is This Answer Correct ?    2 Yes 2 No

How can we extract string ‘abc.com ‘ from a string info@abc.com" target="_blank"..

Answer / supriya

$str1="info@abc.com";
$str1=explode("@",$str1);
print_r($str1);

Is This Answer Correct ?    2 Yes 2 No

How can we extract string ‘abc.com ‘ from a string info@abc.com" target="_blank"..

Answer / rajan vardawaj

We can use the preg_match() function with “/.*@(.*)$/” as
the regular expression pattern. For example:
preg_match(”/.*@(.*)$/”,”info@abc.com”,$data"
target="_blank">http://info@abc.com”,$data); echo $data[1];

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More PHP Interview Questions

What is regular expression in javascript?

0 Answers  


How can i change the extension name like i have a page which name aboutme.php but i want to show it aboutme.php3 or aboutme.aspx?

3 Answers  


Explain what does the function get_magic_quotes_gpc() means?

0 Answers  


Which is not a file-related function in php?

0 Answers  


What is php session start?

0 Answers  


How do you end php?

0 Answers  


Is strcmp case sensitive?

0 Answers  


What is ci framework in php?

0 Answers  


Php being an open source is there any support available to it?

0 Answers  


Write a program to display a table of any given number?

0 Answers  


How can we convert the time zones using PHP?

1 Answers  


What is sql injection in php?

0 Answers  


Categories