How to Regex in DataTable filter_query?

I am building a DataTable with custom filtering that uses Regex.match()
A string beginning with double pipe ‘||’ is interpreted as regex

It works fine for “||.[an]" (a line that contains the letters ‘a’ and/or ‘n’)
It doesn’t work for "||.
(an|pa)” (a line that contains ‘an’ and/or ‘pa’) - the input cell gets a red frame, indicating error.

The filter input cell doesn’t accept some characters, including brackets ‘()’ or ‘{}’
Is there any way of making the filter accept ALL characters used by regex?