placeholder image to represent content

Regular expression in php

Quiz by Viji Gripsy PSGRKCW

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
10 questions
Show answers
  • Q1
    Which function in PHP is used to perform a regular expression match?
    preg_match()
    str_replace()
    explode()
    substr()
    30s
  • Q2
    Which regular expression modifier in PHP performs a case-insensitive match?
    s
    i
    x
    m
    30s
  • Q3
    Which function in PHP is used to perform a regular expression replace?
    str_repeat()
    array_push()
    array_merge()
    preg_replace()
    30s
  • Q4
    Which function in PHP is used to match multiple occurrences of a pattern in a string using regular expressions?
    str_shuffle()
    substr_replace()
    str_split()
    preg_match_all()
    30s
  • Q5
    Which function in PHP is used to extract matches from a string using regular expressions?
    substr()
    explode()
    preg_match_all()
    str_replace()
    30s
  • Q6
    Which regular expression modifier in PHP matches any character except a newline character?
    i
    s
    m
    x
    30s
  • Q7
    Which regular expression metacharacter in PHP matches any non-digit character?
    \s
    \w
    \D
    \d
    30s
  • Q8
    Which regular expression metacharacter in PHP matches any whitespace character?
    \s
    \S
    \w
    \d
    30s
  • Q9
    Which function in PHP is used to replace all occurrences of a pattern in a string using regular expressions?
    str_replace()
    str_shuffle()
    substr_replace()
    preg_replace()
    30s
  • Q10
    Which function in PHP is used to check if a string matches a regular expression pattern?
    substr()
    explode()
    preg_match()
    str_replace()
    30s

Teachers give this quiz to your class