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

Answer Posted / ren

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

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to make a class in php?

543


Whether it is possible to share a single instance of a memcache between multiple php projects?

530


Tell me how can we define a variable accessible in functions of a php script?

522


What is magic quotes?

600


What does $this do in php?

522






What is static variable in php?

606


How many data types are there in php?

586


What the difference between the 'bitwise and' operator and the 'logical and' operator?

518


Explain what does the function get_magic_quotes_gpc() means?

513


Tell me what is use of in_array() function in php?

564


What is the difference between print() and echo()?

573


Is php a programming language?

546


What exactly is PHP?

606


What is the difference between == and === in php?

547


What is $_ env in php?

543