Yes, I know, titles are a form of filter. But, I need to programmatically be able to discern if a field value is a filter or a title/titles.
Currently I’m peeking at the initial characters of the string - if it is prefixed with a single [
then it’s interpreted as a filter. If it is prefixed with [[
or no bracket, then it is/are title/s. That strategy is not sure-fire; a title can, hypthetically, include a string prefixed with [
and a filter needs more stuff than just a [[
prefix. But the context for this all is pretty forgiving and things happen “out in the open” as one types the string, so it is pretty obvious if something goes wrong.
So I’m wondering if there is a better - yet still simple - method to discern if a string is a filter or not. For example, there may be some nifty regexp for it? Some hidden core function? Or just some tiddlenious method…