Courseiva
Using Fields and LookupseasyMultiple ChoiceObjective-mapped

SPLK-1001 Using Fields and Lookups Practice Question

An administrator needs to extract a field from log data where the value appears between two square brackets, for example [error_code: 404]. Which search command should they use to create a custom field extraction without modifying the original data?

⚠ Common exam trap

Splunk often tests the distinction between `extract` (for key-value pairs) and `rex` (for regex-based extraction), and the trap here is that candidates confuse `extract` with general field extraction, not realizing it requires a specific `field=value` format to work.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

rex

The `rex` command is used to extract fields using regular expressions without modifying the raw event data. In this scenario, `rex` can parse the pattern `\[error_code: (?<field>\d+)\]` to capture the value between square brackets into a new field, leaving the original log intact.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • eval

    Why it's wrong here

    eval can create fields but is not optimized for extraction from raw text.

  • fields

    Why it's wrong here

    fields only includes or excludes fields, it does not create new ones.

  • extract

    Why it's wrong here

    Extract is a legacy command for field extractions from dashboards, not for custom regex extraction.

  • rex

    Why this is correct

    rex extracts fields using regex patterns without modifying the original data.

About these practice questions

One of 502 original SPLK-1001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SPLK-1001 practice question is part of Courseiva's free Splunk certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SPLK-1001 exam.