If you insert the format string into a temporary buffer, then the `read' function will read up to the closing parenthesis and update point accordingly. That would be a foolproof way to handle all possible Lisp forms: use a regexp to find the start, and then use `read' to find the end. Then proceed with regexp matching, and repeat like that.
- [BUG] org-compile-prefix-format regexp change breaks eval... Radon Rosborough
- Re: [BUG] org-compile-prefix-format regexp change br... Ihor Radchenko
- Re: [BUG] org-compile-prefix-format regexp chang... Radon Rosborough
- Re: [BUG] org-compile-prefix-format regexp c... Ihor Radchenko
- Re: [BUG] org-compile-prefix-format rege... Radon Rosborough
- Re: [BUG] org-compile-prefix-format rege... Bastien