Test, validate and match regular expressions
Matches 'atom' tokens for S-expression or LISP-like syntax: runs of characters excluding whitespace, parentheses, and quotes, with embedded double-quoted strings that may safely contain spaces or parentheses. The first alternation branch matches atoms starting with plain characters; the second matches atoms beginning with a quoted string. Atomic groups (?>...) prevent backtracking, making it robust for tokenizing query languages like QBAR.