From an email address like something@gmail.com I want to fetch domain name gmail.com. i want to use that pattern on textbox value in Javascript.
something@gmail.com
gmail.com
I would try
\b.*@([A-Za-z0-9.-]+\.[A-Za-z]{2,4})\b
Or maybe tune it a little replacing \bs by ^ and $. With this you can match any domain with A-Z, a-z and 0-9 characters.
\b
^
$