Skip to content

Latest commit

History

History
31 lines (24 loc) 路 679 Bytes

File metadata and controls

31 lines (24 loc) 路 679 Bytes

You want to fetch the top level domain (com) from the email Which of the following functions will you use to accomplish the task?

  • A)
substr("john@ucertify.com", strpos("john@ucertify.com", ".")+1);
  • B)
substr("john@ucertify.com", strpos("john@ucertify.com", "."));
  • C)
eregi("^[a-z0-9\._-]+"."@"."([a-z0-9][a-z0-9-]*[a-z0-9]\.)+"."([a-z]+\.)?"."([a-z]+)$", 'john@ucertify.com'));
  • D)
eregi("john@ucertify.com", ".");
Answer

Answer: A