SPLK-1001 Using Fields and Lookups Practice Question
A user wants to replace a field value 'ERROR' with 'Error' in search results. Which command should be used within a search to achieve this transformation?
⚠ Common exam trap
Splunk often tests the distinction between `rex` (which modifies raw text or a field using regex) and `eval` with `replace` (which performs a simple string replacement on a specific field), leading candidates to choose `rex` when a field-level substitution is needed.
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
✓
eval severity=replace(severity, "ERROR", "Error")
The `replace` function in the `eval` command performs a case-sensitive string replacement on a specific field. In this case, it replaces the exact string 'ERROR' with 'Error' in the `severity` field, which is the precise transformation requested. Unlike `rex`, `replace` does not require regex syntax and directly modifies the field value without affecting other parts of the event.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
rex field=_raw 's/ERROR/Error/g'
Why it's wrong here
rex extracts fields; it does not modify existing fields in place.
- ✓
eval severity=replace(severity, "ERROR", "Error")
Why this is correct
eval with replace function modifies the field value.
- ✗
lookup severity_lookup severity OUTPUT new_severity
Why it's wrong here
lookup adds fields from a lookup table, does not replace in place.
- ✗
convert ctime(_time)
Why it's wrong here
convert changes time formats, not string values.
Go deeper
Related to this question
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 →
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.