H12-831_V1-0 practice question 21 of 35

Which of the following sequences can be matched by the regular expression 100.S

Full set: 265 questions

Domain Routing Control

Answer options
A: 100
B: 1000 Correct answer
C: 10000
D: 1001 Correct answer
Correct Answer:
B. 1000; D. 1001
Explanation

The regular expression 100. is designed to match a sequence that begins with the literal string "100" and is followed by exactly one of any single character. The dot (.) is a metacharacter that serves as a wildcard for a single character. The 'S' in the provided question appears to be a typographical error, as it has no standard special meaning in this context and does not align with the options. Evaluating based on the most probable intended expression 100., both "1000" and "1001" are valid matches. They start with "100" and are followed by a single character ('0' and '1', respectively), resulting in a total length of four characters.

Why Incorrect

A. 100: This sequence is too short. It is missing the fourth character required to satisfy the dot (.) metacharacter in the expression.
C. 10000: This sequence is too long. The expression 100. is defined to match a total of exactly four characters, not five.

References

1. Huawei VRP Documentation: In Huawei's Versatile Routing Platform (VRP), regular expressions are used for features like BGP ASPATH filtering. The documentation confirms the standard meaning of metacharacters.

Source: Huawei CloudEngine S12700 V200R019C10 Configuration Guide - BGP.

Section: "Configuring BGP > Configuring BGP Route Filtering > Configuring an ASPATH Filter > Table 10-41 Regular expression characters".

Content: The table explicitly defines the dot (.) as "Matches any single character, including a space." This supports the analysis that 100. matches "100" followed by any one character.

2. Academic Courseware: Reputable computer science curricula define the fundamental syntax of regular expressions, which is consistent across most implementations.

Source: MIT OpenCourseWare, 6.031: Software Construction, Spring 2016.

Section: "Readings: Regular Expressions".

Content: The course material defines the . (dot) metacharacter as matching "any single character except newline". This foundational principle confirms that 100. matches a four-character string starting with "100".

Scroll to Top