GoConqr has a new look! Let us know what you think.

Quiz

Regular Expressions - 1,2

Zarina Kiyakhmetova 20 questions

Take the quiz

Questions in this quiz (20)

  1. 1 PHP has long supported two regular expression implementations known as _______ and _______
    i) Perl
    ii) PEAR
    iii) Pearl
    iv) POSIX
    1. Aa) i) and ii)
    2. Bb) ii) and iv)
    3. Cc) i) and iv)
    4. Dd) ii) and iii)
  2. 2Which one of the following regular expression matches any string containing zero or one p?
    1. Aa) p+
    2. Bb) p*
    3. Cc) P?
    4. Dd) p#
  3. 3[:alpha:] can also be specified as..
    1. Aa) [A-Za-z0-9].
    2. Bb) [A-za-z].
    3. Cc) [A-z].
    4. Dd) [a-z].
  4. 4How many functions does PHP offer for searching strings using POSIX style regular expression?
    1. Aa) 7
    2. Bb) 8
    3. Cc) 9
    4. Dd) 10
  5. 5What will be the output of the following PHP code?Image for question 5
    1. Aa) Error
    2. Bb) Username must be all lowercase!
    3. Cc) Username is all lowercase!
    4. Dd) No Output is returned
  6. 6POSIX implementation was deprecated in which version of PHP?
    1. Aa) PHP 4
    2. Bb) PHP 5
    3. Cc) PHP 5.2
    4. Dd) PHP 5.3
  7. 7POSIX stands for
    1. Aa) Portable Operating System Interface for Unix
    2. Bb) Portable Operating System Interface for Linux
    3. Cc) Portative Operating System Interface for Unix
    4. Dd) Portative Operating System Interface for Linux
  8. 8What will be the output of the following PHP code?Image for question 8
    1. Aa) this is some text that we might like to parse.
    2. Bb) Array ( [0] => some text that [1] => we might like to parse. )
    3. Cc) Array ( [0] => this is [1] => some text that [2] => we might like to parse. )
    4. Dd) [0] => this is [1] => some text that [2] => we might like to parse.
  9. 9Which of the following would be a potential match for the Perl-based regular expression /fo{2,4}/ ?
    i) fol
    ii) fool
    iii) fooool
    iv) fooooool
    1. Aa) Only i)
    2. Bb) ii) and iii)
    3. Cc) i), iii) and iv)
    4. Dd) i) and iv)
  10. 10Which among the following is/are not a metacharacter?
    i) \a
    ii) \A
    iii) \b
    iv) \B
    1. Aa) Only i)
    2. Bb) i) and iii)
    3. Cc) ii), iii) and iv)
    4. Dd) ii) and iv)

Information

Description
Quiz on Regular Expressions - 1,2, created by Zarina Kiyakhmetova on 20/12/2018.
Language
English
Views
154
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?