1V0-31.21 · Question #10
What is the search query result if the vRealize Log Insight regular expression "(A|b|c)" is used?
The correct answer is C. A or b or c. The regular expression "(A|b|c)" matches any string that contains either the character "A", the character "b", or the character "c". It is a logical OR expression, which means that it will match any string that matches any of the operands.
Question
What is the search query result if the vRealize Log Insight regular expression "(A|b|c)" is used?
Options
- AA or b and c
- BA and b or c
- CA or b or c
- DA and b and c
How the community answered
(46 responses)- A2% (1)
- B7% (3)
- C89% (41)
- D2% (1)
Explanation
The regular expression "(A|b|c)" matches any string that contains either the character "A", the character "b", or the character "c". It is a logical OR expression, which means that it will match any string that matches any of the operands.
Topics
Community Discussion
7Think of the pipe character in that regex the same way you think of a diner menu that says "choose one: soup, salad, or sandwich." Each pipe separates an option, and the query is satisfied the moment any single option matches. So "(A|b|c)" is asking Log Insight to find events that contain A, or b, or c, making the correct answer C. People trip on this because they see multiple items and assume some kind of AND logic, but the pipe is purely an OR separator, full stop. The parentheses just group the choices together, they do not change the OR behavior one bit.
The pipe character in a regex alternation group means OR between each alternative, so "(A|b|c)" matches any single token that is A, or b, or c, making C the only defensible pick here. On test day, whenever you see a grouped alternation with pipes, translate each pipe mentally as "or" and you will never confuse it with an AND relationship.
The pipe in a regex alternation group means OR between each term, so (A|b|c) matches A, or b, or c, full stop. Option B tries to trip you up by mixing "and" and "or" like the pipe somehow changes behavior mid-group, but it does not, answer is C.
Right, and the real-world way to lock that in is to think of the pipe like a fork in the road, the regex engine tries the left path first, and if that road dead-ends it backs up and tries the right path, which is why the order of your alternatives can matter when patterns overlap.
This one is a gift, do not sit on it. The pipe character in a regular expression is the OR operator, full stop, so (A|b|c) tells Log Insight to return any line that contains A, or b, or c, which maps straight to answer C. When I sat for this exam last spring I hit this question inside the first fifteen minutes and flagged nothing because I recognized it cold in under ten seconds, clicked C, and moved on hard. The trap they are setting with options A and B is mixing in the word "and," which would require a completely different construction like a lookahead or multiple separate conditions chained together, and the exam writers know a tired candidate will second-guess themselves and burn a minute they cannot get back. Quick win, bank the time, never look back.
Been grinding Log Insight queries all week and I am pretty confident this is B, because the way vRealize parses that expression the pipe between A and b acts as a conditional AND bridge while the final pipe before c flips to OR, which is exactly how the engine handles mixed groupings in that product. Seen this catch people off guard on the actual exam because you can't just read it like pure regex, you have to account for how Log Insight interprets grouped alternation internally.
Appreciate the deep dive Imani, but the answer is C here because in vRealize Log Insight that expression treats all pipe characters as simple OR operators with no mixed AND bridging, so the query matches any event containing a, b, or c independently.