- A regular expression is a pattern describing a certain amount of text.
From my understanding, the correct syntax should be -
- A regular expression is a pattern that describes a certain amount of text.
So why the first sentence is correct?
From my understanding, the correct syntax should be -
So why the first sentence is correct?
[1] A regular expression is a pattern [describing a certain amount of text].
[2] A regular expression is a pattern [that describes a certain amount of text
In both examples the expression in brackets is a modifier in noun phrase structure, where it modifies "pattern".
They are semantically similar, but in [1] it's a gerund-participial clause, while in [2] it's a relative clause.
We don't call [1] a relative clause since there is no possibility of it containing a relative phrase (cf. *a pattern which describing a certain of ...).