Which one of the following preg PHP functions is used to take a string, and put it in an array? preg_split() preg_unchain() preg_destroy() preg_divide() TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following functions is used to search a string? preg_search preg_found preg_match preg_find TRUE ANSWER : ? YOUR ANSWER : ?
Which one of the following is not a preg PHP function? preg_matchall preg_split preg_match preg_match_all TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following would be a potential match for the Perl-based regular expression /fo{2,4}/ ?<br/>1. fol<br/>2. fool<br/>3. fooool<br/>4. fooooool 1 and 4 2 and 3 1, 3 and 4 Only 1 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$text = "this istsome text thatnwe might like to parse.";<br/>print_r(split("[nt]",$text)); [0] => this is [1] => some text that [2] => we might like to parse. Array ( [0] => some text that [1] => we might like to parse. ) Array ( [0] => this is [1] => some text that [2] => we might like to parse. ) this is some text that we might like to parse. TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$username = "jasoN";<br/>if (ereg("([^a-z])",$username))<br/>echo "Username must be all lowercase!";<br/>else<br/>echo "Username is all lowercase!"; No Output is returned Username must be all lowercase! Error Username is all lowercase! TRUE ANSWER : ? YOUR ANSWER : ?
Which among the following is/are not a metacharacter?<br/>1. /a<br/>2. /A<br/>3. /b<br/>4. /B 1 and 3 2, 3 and 4 Only 1 2 and 4 TRUE ANSWER : ? YOUR ANSWER : ?
Say we have two compare two strings which of the following function/functions can you use?<br/>1. strcmp()<br/>2. strcasecmp()<br/>3. strspn()<br/>4. strcspn() 3 and 4 None of the mentioned 1 and 2 All of the mentioned TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$name = "What is your name?";<br/>if (preg_match("/name/"),$name)<br/>echo "My name is Will Pitt ";<br/>else<br/>echo "My name is not Will Pitt ";<br/>if (preg_match("/are/"))<br/>echo "I am great"else echo "I am not great"; My name is not Will Pitt I am not great My name is Will Pitt I am great My name is Will Pitt I am not great My name is not Will Pitt I am great TRUE ANSWER : ? YOUR ANSWER : ?
How many functions does PHP offer for searching strings using POSIX style regular expression? 7 10 9 8 TRUE ANSWER : ? YOUR ANSWER : ?