Which of the following is a primary application of regular expressions in the…

2025

Which of the following is a primary application of regular expressions in the field of computing?

  1. A.

    Analyzing semantic equivalence of programming constructs

  2. B.

    Constructing syntax trees for parsing context-sensitive languages

  3. C.

    Defining lexical patterns for token recognition in compilers

  4. D.

    Modeling non-deterministic pushdown automata

Attempted by 38 students.

Show answer & explanation

Correct answer: C

In computing, particularly in compiler design, Regular Expressions (Regex) serve as the formal mathematical specification for defining the syntax rules of a language's lowest-level components.

Explore the full course: Niacl Ao It Specialist