nerdexam
Splunk

SPLK-1004 · Question #5

What is the recommended way to create a field extraction that is both persistent and precise?

The correct answer is B. Use the Field Extractor and manually edit the generated regular expression. Using the Field Extractor (IFX) with manual regex editing achieves both goals because it saves the extraction to Splunk's configuration files (props.conf/transforms.conf), making it persistent across all searches, while allowing you to refine the auto-generated regex for…

Advanced Search Commands and Techniques

Question

What is the recommended way to create a field extraction that is both persistent and precise?

Options

  • AUse the rex command.
  • BUse the Field Extractor and manually edit the generated regular expression.
  • CUse the Field Extractor and let it automatically generate a regular expression.
  • DUse the erex command.

How the community answered

(42 responses)
  • A
    7% (3)
  • B
    86% (36)
  • C
    2% (1)
  • D
    5% (2)

Explanation

Using the Field Extractor (IFX) with manual regex editing achieves both goals because it saves the extraction to Splunk's configuration files (props.conf/transforms.conf), making it persistent across all searches, while allowing you to refine the auto-generated regex for precision - catching exactly what you intend without over-matching.

  • A (rex) is wrong because rex is a search-time command: it only applies to the current search and is never saved persistently.
  • C (auto-generate only) is wrong because the auto-generated regex is a starting point, not a finished product - it can be too broad or fragile without manual tuning.
  • D (erex) is wrong for the same reason as rex: erex helps build a regex from examples at search time but does not persist anything on its own.

Memory tip: Think "two hands, two P's" - the Field Extractor's hand handles Persistence (writes to config), and your hand editing the regex handles Precision. You need both hands for the job.

Topics

#field extraction#Field Extractor#regex#persistent extractions

Community Discussion

No community discussion yet for this question.

Full SPLK-1004 Practice