Regex: How to find "in the face of" with or without "the"?

How to find “in the face of” with or without “the”?

The usual regular expression would be: in (the )?face of. The trailing question mark indicates zero or one instances.

seems right also without the useless brackets.

in ?(the ?)?face ?of is shorter and made more sense. Besides, your code would optionally add 2 spaces between ‘face’ and ‘of’.

@karolus @rautamiekka, thanks for the clarification and corrections.

Thanks, oweng. It works. The brackets are necessary.
Sorry for the late reply. I just realised why I’ve never gotten email notifications!