MCQOPTIONS
Saved Bookmarks
This section includes 7 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which of the following functions clears the regular expression cache? |
| A. | re.sub() |
| B. | re.pos() |
| C. | re.purge() |
| D. | re.subn() |
| E. | |
| Answer» D. re.subn() | |
| 2. |
In Regex, [a-n] stands for? |
| A. | Returns a match for any digit between0and9 |
| B. | Returns a match for any lower case character, alphabetically betweenaandn |
| C. | Returns a match for any two-digit numbers from00and59 |
| D. | Returns a match for any character EXCEPTa,r, andn |
| Answer» C. Returns a match for any two-digit numbers from00and59 | |
| 3. |
In Regex, s stands for? |
| A. | Returns a match where the string DOES NOT contain digits |
| B. | Returns a match where the string DOES NOT contain a white space character |
| C. | Returns a match where the string contains a white space character |
| D. | Returns a match if the specified characters are at the end of the string |
| Answer» D. Returns a match if the specified characters are at the end of the string | |
| 4. |
Which character stand for Zero or more occurrences in regex? |
| A. | * |
| B. | # |
| C. | @ |
| D. | | |
| Answer» B. # | |
| 5. |
Which character stand for Starts with in regex? |
| A. | & |
| B. | ^ |
| C. | $ |
| D. | # |
| Answer» C. $ | |
| 6. |
Which function returns a list containing all matches? |
| A. | findall |
| B. | search |
| C. | split |
| D. | find |
| Answer» B. search | |
| 7. |
Python has a built-in package called? |
| A. | reg |
| B. | regex |
| C. | re |
| D. | regx |
| Answer» D. regx | |