Courseiva
mediumMultiple Choice

CAS-004 Practice Question: A data loss prevention (DLP) solution is being…

A data loss prevention (DLP) solution is being implemented to prevent sensitive data from leaving the corporate network. Which of the following is the most effective approach for detecting structured data like credit card numbers in outbound traffic?

⚠ Common exam trap

CAS-005 often tests the distinction between detection techniques for structured versus unstructured data — candidates must recognize that regex is the right tool for fixed-format identifiers like credit card numbers, while ML is for unstructured content.

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

✓

Regular expression matching

Regular expression matching is the most effective approach for detecting structured data like credit card numbers because it can match the specific pattern (e.g., 16 digits with optional separators) and validate format, such as the Luhn check in some DLP engines. This provides high precision for well-defined formats like PANs, SSNs, and IBANs.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Keyword matching

    Why it's wrong here

    Keyword matching searches literal strings, so it cannot recognise the 16-digit patterns, spacing variants or Luhn validity of card numbers. It is tempting because it is simple to configure for named terms, but detecting structured data such as credit card numbers requires regular-expression pattern matching.

  • ✓

    Regular expression matching

    Why this is correct

    Regular expressions match the fixed numeric patterns of credit card numbers, such as 16-digit groupings with valid prefixes, in outbound traffic. This pattern-based detection suits structured data, unlike keyword or document-fingerprint methods aimed at unstructured content.

  • ✗

    Machine learning classification

    Why it's wrong here

    Machine learning classification infers document sensitivity from trained features, which is probabilistic and cannot reliably pinpoint every 16-digit card number in outbound traffic. It is tempting for classifying unstructured content, but structured data detection demands deterministic pattern matching with checksum validation.

  • ✗

    Exact file hash matching

    Why it's wrong here

    Exact file hash matching compares a file's cryptographic digest against known-bad signatures, so a card number typed into a new document or email body produces no match. It is tempting for blocking known sensitive files, but structured data detection requires pattern or regex matching with validation.

About these practice questions

One of 973 original CAS-005 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 CompTIA exam blueprint

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