nerdexam
CompTIA

CS0-003 · Question #447

A web application has a function to retrieve content from an internal URL to identify CSRF attacks in the logs. The security analyst is building a regular expression that will filter out the…

The correct answer is B. "https://10\.1\.2\.3/api\?id=\d+. The correct regular expression to match a GET request to this API endpoint is "https://10\.1\.2\.3/api\?id=\d+". This pattern checks for the specific URL with an id parameter that accepts integer values. The syntax \d+ matches one or more digits, which aligns with the…

Submitted by chen.hong· Mar 6, 2026Security Operations

Question

A web application has a function to retrieve content from an internal URL to identify CSRF attacks in the logs. The security analyst is building a regular expression that will filter out the correctly formatted requests. The target URL is https://10.1.2.3/api, and the receiving API only accepts GET requests and uses a single integer argument named "id." Which of the following regular expressions should the analyst use to achieve the objective?

Options

How the community answered

(55 responses)
  • A
    4% (2)
  • B
    73% (40)
  • C
    16% (9)
  • D
    7% (4)

Explanation

The correct regular expression to match a GET request to this API endpoint is "https://10\.1\.2\.3/api\?id=\d+". This pattern checks for the specific URL with an id parameter that accepts integer values. The syntax \d+ matches one or more digits, which aligns with the requirement for a single integer argument. Other options either use incorrect syntax or do not accurately capture the expected URL format.

Topics

#regular expressions#log filtering#web application security#API security

Community Discussion

No community discussion yet for this question.

Full CS0-003 Practice