PCA (Prometheus Certified Associate) sample exam question with answer 617

Question:
Which of the following statements about the label_replace() function is true? (Select all that apply)

  1. It can be used to rename existing labels
  2. It can be used to add new labels
  3. It can be used to delete existing labels
  4. It can be used to match labels using regular expressions
Answer:
A, B, D - are the correct answers. The label_replace() function can be used to rename existing labels or add new labels, and it supports regular expressions for matching labels
C - is incorrect. This function cannot be used to delete existing labels