SPLK-5001 · Question #15
An analyst needs to create a new field at search time. Which Splunk command will dynamically extract additional fields as part of a Search pipeline?
The correct answer is A. rex. rex is correct because it uses regular expressions to dynamically extract new fields from existing field values at search time, adding them to events as part of the pipeline without modifying the underlying data or index. B. fields - only includes or excludes existing fields…
Question
An analyst needs to create a new field at search time. Which Splunk command will dynamically extract additional fields as part of a Search pipeline?
Options
- Arex
- Bfields
- Cregex
- Deval
How the community answered
(51 responses)- A88% (45)
- B6% (3)
- C2% (1)
- D4% (2)
Explanation
rex is correct because it uses regular expressions to dynamically extract new fields from existing field values at search time, adding them to events as part of the pipeline without modifying the underlying data or index.
- B.
fields- only includes or excludes existing fields from results; it cannot create or extract new ones. - C.
regex- filters events by matching a pattern (likeWHEREfor regex), but does not extract or create fields. - D.
eval- creates calculated fields by evaluating expressions (math, string operations, conditionals), but it computes values from existing fields rather than extracting them from raw text via pattern matching.
Memory tip: Think "rex = regex extract" - the name itself hints at its purpose. If you need to pull a new field out of raw text using a pattern, reach for rex; if you need to calculate a new field from existing values, use eval.
Topics
Community Discussion
No community discussion yet for this question.