PHP Strings and Regular Expressions Mcqs

Our collections of Multiple choice questions and answers focuses on study of PHP Strings and Regular Expressions. These questions are chosen from a collection of most authoritative and best reference books on PHP Strings and Regular Expressions. Our aim is to prepare an individual for competitive exams like NTS, GAT, ECAT, University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate PHP Strings and Regular Expressions Topics comprehensively.

Which function is used to take a string as argument and returns a string that is stripped of all HTML and PHP tags?

Nl2br ( )

Strip ( )

Strip_tags ( )

All of them

In Perl-compatible patterns any pattern that is followed by ? this means that

Match this pattern 1 or more times

Match this pattern exactly 1 time

Match this pattern 0 times

None of them

What is meaning of “.” in POSIX style regex?

Matches any character of a string

Matches the beginning of a string

Matches the end of a string

None of them

Why a special character is used in beginning and end of string in Perl-compatible patterns?

Because it indicates the beginning and end of the pattern

Because it indicates that it?s a integer string

Because it indicates the literal

It indicates nothing

Scroll to Top