exam questions

Exam CIS-SM All Questions

View all questions & answers for the CIS-SM exam

Exam CIS-SM topic 1 question 36 discussion

Actual exam question from ServiceNow's CIS-SM
Question #: 36
Topic #: 1
[All CIS-SM Questions]

Which one of the following Regular Expressions could be used to parse the value 5.2.0 from the string?
Version 5.2.0

  • A. Version (\.*)
  • B. Version\s+(\d+\.\d+\.\d+)
  • C. Version (\d+)
  • D. Version (\d+).(\d+).(\d+)
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
7af8912
2 months, 1 week ago
Selected Answer: B
B is the correct answer. Version\s+: This part matches the literal string "Version" followed by one or more whitespace characters. (\d+.\d+.\d+): This part captures a group of digits, followed by a dot, followed by another group of digits, followed by a dot, and finally another group of digits. This matches the version number format "X.Y.Z". The parentheses () capture the version number, which can then be extracted and used for further processing. P.S. Answer 'A' would match any character after "Version", including spaces and punctuation, which is not what we want.
upvoted 2 times
marrole
3 weeks, 4 days ago
actually A would match 0 or more ocurrences of the character "." due to having the backslash. For A to be a possible answer it should be "Version (.*)"
upvoted 1 times
...
...
darknoor65
7 months, 1 week ago
Selected Answer: B
I correct myself, after a quick check, the answer is B
upvoted 1 times
...
darknoor65
7 months, 1 week ago
Selected Answer: D
Normally it's D
upvoted 1 times
...
ParagSanyashiv
1 year, 7 months ago
Selected Answer: B
B is correct answer
upvoted 1 times
...
Roland_Polanski
1 year, 10 months ago
should be B
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago