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

Answer Posted / arun

set chk "xxx@yyy.com"

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

puts $one
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What exactly is PHP?

606


What is difference between array_merge and array_combine?

517


How do you count numbers in php?

495


Is php a mvc?

508


Tell me is it possible to protect special characters in a query string?

493






How to remove values saved in the current session?

530


Is php a strongly typed language?

558


How can I convert ereg expressions to preg in php?

474


what is variable scope, which variables are accessible from where and what are "undefined variable" errors?

503


What is the difference between pop3 IMAP and MAPI?

635


What is the importance of php?

517


What are the different types of statements that are present in php?

543


Tell me whether it is possible to share a single instance of a memcache between multiple php projects?

537


How to call php function from javascript using ajax?

516


How do you check is php not empty?

546