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...


Write a regular expression to get the value xxx from the
string 'xxx@yyy.com'

Answers were Sorted based on User's Feedback



Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / bipin

<?php
$string = 'xxx@yyy.com';
list($firstString,$secondString) = split('@',$string);
echo $firstString;
?>

Is This Answer Correct ?    9 Yes 7 No

Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / stalin raja.h

<?php
$string = 'xxx@yyy.com';
$sub = substr('$string',0,2);
echo $sub;
?>

Is This Answer Correct ?    2 Yes 0 No

Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / tclgeek

set url "xxx@yyy.com"
regexp {([^@]+)@([^.]+).([a-z]+)} $url match match1
puts " Match....$match1"

Is This Answer Correct ?    2 Yes 0 No

Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / arun

set chk "xxx@yyy.com"

if {[regexp {([a-z]+)} $chk match one ]} {

puts $one
}

Is This Answer Correct ?    2 Yes 0 No

Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / sunil kumar

hello Bipin bhaiya, ur program is right but when I run this
program I encountered an error and i.e.

Deprecated: Function split() is deprecated in
C:\wamp\www\Test\aa.php on line 3


pl.tell me what`s that error


sunilnagpal30@yahoo.in

Is This Answer Correct ?    0 Yes 0 No

Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / ren

set url "xxx@yyy.com"
regexp {([^@]+)@([^.]+).([a-z]+)} $url match
puts " Match....$match"

Is This Answer Correct ?    1 Yes 1 No

Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / tclgeek.com

set url "xxx@yyy.com"
regexp {(\w+)@.+\.com} $url match
puts "Match is--->$match"

Is This Answer Correct ?    0 Yes 0 No

Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / 23626

set url "xxx@yyy.com"
regexp {[^@]+} $url M1
puts $M1

Is This Answer Correct ?    0 Yes 0 No

Write a regular expression to get the value xxx from the string 'xxx@yyy.com'..

Answer / esorimer

preg_replace("/(.*)@(.*)/","\1",$string);

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More PHP Interview Questions

how to use between operator when retrieve from database(format-2008-jun-06)

3 Answers  


Hi this is amul jani here, i complied my graduation in B.com stream.. but as career i looking for PHP language.. to get shape my career. so is that possible to enter in IT world.. for me how much scope of develop my career in this field.. amul jani

0 Answers  


What type of inheritance that PHP supports?

15 Answers   Webwing Technologies,


What is putenv?

0 Answers  


What is Joomla?

5 Answers   T3 Softwares, Zend,


How to execute an sql query?

0 Answers  


How can I increase my website session?

0 Answers  


In php how can you jump in to and out of "php mode"?

0 Answers  


iam mca post graduate in 2010 not getting job in JAVA so iam looking for carear in php as market demand is high so it is best option to try for php or not

0 Answers  


What is exception in php?

4 Answers  


What is php glob?

0 Answers  


Is set in php?

0 Answers  


Categories