I suggest this pattern that matches all "literal patterns" (* understand well-formed patterns where all characters are literals or escaped with special characters or backslashes are ignored)
in the shorthand line:
\A
[^[\\|{.?*+^$()]*
(?>
(?:
{+ (?! [0-9]+ (?:,[0-9]*)? } )
|
\\ [^\p{L}\p{N}]
)
[^[\\|{.?*+^$()]*
)*
\z
Note: this template is for .net syntax.
2: IgnorePatternWhitespace # , , : [^[\\|{.?*+^$()#\s]