Courseiva
Advanced Data Manipulation →mediumMultiple Choice

UiPath-ADPv1 Advanced Data Manipulation Practice Question

A developer needs to extract a 10-digit account number from a string that always appears immediately after the phrase 'Account Number: ' and before the word ' (Active)'. Which Regex pattern is most appropriate for this specific extraction?

⚠ Common exam trap

A common mistake is including the anchor words inside the matching group, which forces the developer to manually strip the text later. Many candidates also forget to escape special characters like parentheses, which can lead to the Regex engine failing to match the terminating ' (Active)' string.

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

✓

(?<=Account Number: )\d{10}(?= \(Active\))

Using Positive Lookbehind and Positive Lookahead ensures that the extraction is precise and does not include the surrounding anchor text in the result. In advanced automation, using zero-width assertions like these is preferred over simple matching because it eliminates the need for additional string trimming or sub-stringing after the Regex match is found.

Answer analysis

Option-by-option breakdown

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

  • ✓

    (?<=Account Number: )\d{10}(?= \(Active\))

    Why this is correct

    The syntax correctly uses a positive lookbehind to find the prefix and a positive lookahead for the suffix. The account number is targeted by the digit shorthand and quantifier. This ensures only the ten digits are returned in the match group, making the data immediately ready for use in subsequent activities.

  • ✗

    Account Number: \d{10} (Active)

    Why it's wrong here

    This pattern matches the entire sequence including the static text and the digits, which is not what was requested. Without lookarounds, the resulting string would require further manipulation to isolate the account number. Additionally, the parentheses around 'Active' would be interpreted as a capturing group rather than literal characters.

  • ✗

    [0-9]{10}(?=Active)

    Why it's wrong here

    While this pattern finds ten digits, it lacks the necessary lookbehind for 'Account Number:', which could lead to false positives if other numbers exist. It also misses the space and the literal parentheses in the lookahead. This lack of specificity makes the pattern unreliable in documents with multiple numerical identifiers or similar text.

  • ✗

    (?<=Account Number: ).*(?=Active)

    Why it's wrong here

    Using the dot-star quantifier is dangerous here because it is greedy and might match more text than intended if 'Active' appears multiple times. It also fails to enforce the requirement that the account number must be exactly ten digits. Specifying the exact type and length of data is critical for robust data extraction.

About these practice questions

One of 276 original UiPath-ADPv1 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official UiPath exam blueprint

This UiPath-ADPv1 practice question is part of Courseiva's free UiPath 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 UiPath-ADPv1 exam.