3 quizzes found.

Which string does the following PCRE regular expression match?

$regex = "/^([a-z]{5})[1-5]+([a-z]+)/";
  1. None of the above
  2. Hello34262343goodbye
  3. frank12345abc
  4. hello34212343goodbye
  5. abcdefghi12345abc

Choose 2 answers

Which PCRE regular expression will match the string PhP5-rocks?

  1. /^[hp1-5]*\-.*/i
  2. /[hp1-5]*\-.?/
  3. /[hp][1-5]*\-.*/
  4. /[PhP]{3}[1-5]{2,3}\-.*$/
  5. /[a-z1-5\-]*/

Choose 1 answers

If regular expressions must be used, in general which type of regular expression functions available to PHP is preferred for performance reasons?

  1. strtok() using regular expressions
  2. preg_* regular expression functions
  3. parse_str() using regular expressions
  4. strregex* regular expression functions
  5. ereg* regular expression functions

Choose 1 answers