UiARD Exam QuestionsBrowse all questions from this exam

UiARD Exam - Question 56


A developer needs to automate a process which involves capturing support ticket numbers from the email subject line. For example, the email subject line includes: "Action Required – XA/135" where "XA/135" is the ticket number. The robot should validate the pattern of the ticket number before proceeding.

Which expression exclusively matches the ticket number pattern from the subject line?

Show Answer
Correct Answer: D

To match the ticket number pattern 'XA/135' one needs to use a regular expression that captures two alphanumeric characters followed by a forward slash and then three digits. The pattern '(\w{2})/(\d{3})' fits this requirement as it ensures exactly two word characters before the slash and exactly three digits after it.

Discussion

5 comments
Sign in to comment
Engineer24Option: D
Apr 18, 2024

If you want to match exactley "XA/135", and you will test in studio the answer will be D. The pattern expresion is: "(\w{2})/(\d{3})".

JmIgualadorOption: A
Jul 5, 2024

You want to extract the Number from the entire Subject of the mail, so you have to include Anything in the regex.

JmIgualador
Jul 7, 2024

Ok the correct answer is D.

MirjalolOption: D
Jul 17, 2024

D works fine

bhaskar5a5
Sep 6, 2024

Ans : D

IngvarnOption: D
Nov 22, 2024

Ans : D