PCA Prometheus Fundamentals Practice Question
You are performing a 'label_replace' operation. What is the correct syntax for a regex capture group?
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
✓
$1
Prometheus uses standard RE2 regex syntax, where capture groups are accessed via $1, $2, etc.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
\1
Why it's wrong here
Backslashes are not the correct syntax for replacement in label_replace.
- ✗
{1}
Why it's wrong here
Curly braces are not used for capture group references.
- ✗
%1
Why it's wrong here
Percent signs are not used for capture group indexing.
- ✓
$1
Why this is correct
Prometheus uses $1 for the first captured group in replacement strings.
About these practice questions
One of 304 original PCA 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official CNCF / Linux Foundation exam blueprint
This PCA practice question is part of Courseiva's free CNCF / Linux Foundation 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 PCA exam.