New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

ServiceNow CIS-EM Exam - Topic 2 Question 80 Discussion

Actual exam question for ServiceNow's CIS-EM exam
Question #: 80
Topic #: 2
[All CIS-EM Questions]

Which is a correct regex expression to capture only the server's hostname (webserver3) in "The server webserver3.domain.com is down."?

Show Suggested Answer Hide Answer
Suggested Answer: D

Contribute your Thoughts:

0/2000 characters
Reita
3 months ago
D? Really? That can't be correct.
upvoted 0 times
...
Marget
3 months ago
C looks good, but not specific enough.
upvoted 0 times
...
Fletcher
3 months ago
I think B is way off.
upvoted 0 times
...
Sunshine
3 months ago
Wait, can regex really do that? Sounds tricky!
upvoted 0 times
...
Latosha
4 months ago
A is the right choice!
upvoted 0 times
...
Sarina
4 months ago
I feel like option C might work, but I can't recall if the `\s` is the right choice for what we need here.
upvoted 0 times
...
Mitzie
4 months ago
None of these seem quite right to me. I thought we needed to use something like `(\w+)` for just the hostname.
upvoted 0 times
...
Denna
4 months ago
I remember practicing regex questions, and I feel like we need to focus on the part before the first dot.
upvoted 0 times
...
Mee
5 months ago
I think option A looks familiar, but I'm not sure if it captures just the hostname correctly.
upvoted 0 times
...
Stevie
5 months ago
Okay, I've got it! The answer is C. The (.*) will capture the hostname, and \s will match the whitespace after it. Nice and simple.
upvoted 0 times
...
Chaya
5 months ago
Hmm, this is a tricky one. I'm leaning towards option B, but I'm not 100% sure. I'll double-check the regex syntax to make sure I'm understanding it correctly.
upvoted 0 times
...
Marcelle
5 months ago
I'm a bit confused by this question. The regex expressions all look pretty complex to me. I'll have to think it through carefully.
upvoted 0 times
...
Edelmira
5 months ago
I think the answer is C. The regex (.*) will capture the hostname, and \s will match the whitespace after it.
upvoted 0 times
...
Tamekia
6 months ago
I think D) The server (.*?)\\* is too restrictive and won't capture the full hostname
upvoted 0 times
...
Lezlie
7 months ago
I'm not sure, but I think A) captures everything after 'The server'
upvoted 0 times
...
Heike
7 months ago
I disagree, I believe it's C) The server (.*)\\s.*
upvoted 0 times
...
Ailene
7 months ago
I think the correct regex expression is A) The server (.*)\\..*
upvoted 0 times
...
Daren
7 months ago
I think option C is the correct regex expression. It captures the hostname (webserver3) between 'The server' and '.domain.com'.
upvoted 0 times
Nobuko
7 months ago
I think option C is the correct regex expression. It captures the hostname (webserver3) between 'The server' and '.domain.com'.
upvoted 0 times
...
...

Save Cancel