ServiceNow Certified Implementation Specialist – Service Mapping — Question 15
Which one of the following Regular Expressions could be used to parse the value 5.2.0 from the string?
Version 5.2.0
Answer options
- A. Version (\.*)
- B. Version\s+(\d+\.\d+\.\d+)
- C. Version (\d+)
- D. Version (\d+).(\d+).(\d+)
Correct answer: B
Explanation
Option B is correct because it accurately captures the version format with three sets of digits separated by periods. Option A is incorrect as it does not specify the number format. Option C only captures the first set of digits and misses the others, while Option D captures the correct format but does not account for the whitespace after 'Version'.