Is there any way to create a search (or, preferably, a smart group) that can find all all items in a DT database that begin with a military-style date (e.g. “2017-12-18 …” ?
I’ve tried various combinations of wildcard, but the hyphens seem to mess things up (I suspect because DT break words on these boundaries). Also, there doesnt seem to be a way to “anchor” the search to the start of the name.
Of course regex would be useful, but even the ability to a database wide search on punctuation would be nice (cmd-shift-f: obviously it works on cmd-f).
I’m sure there’s a valid technical explanation, but it’s always seemed a bit odd that a program so powerful as DTP can’t do a basic search for text delimited with punctuation.
For example, instead of being able to have information within simple fields in a document (court records, for example) you have to mess around inventing unique field names (XCRT:) to avoid pulling up false positives, simply because ‘he told the court’ is indistinguishable from 'Court: '.
Of course you can work round it, but when the AI can do so many advanced things, on the face of it this seems such an obvious gap in capability. (I’m not for a second suggesting there aren’t valid reasons for the limitation…)
[When someone comes along and shows me how to search for punctuation easily I shall feel both embarrassed and grateful…]
That may be true, but there are excellent tools / websites out there that help you formulate specific RegEx patterns. BBEdit‘s Pattern Playground, for example, is a godsend. So it may take some experimentation for those who don’t think like engineers, but it can be done, and then it’s such a help!
I have more than a bit of engineering education and experience, and that gave me confidence to go with my “gut” which says … avoid RegEx unless absolutely required, and then if required, hire an expert.
But REs are a lot more useful There are so many programs that understand them, on all platforms (just think of Emacs !), whereas AppleScript… That’s not even available on iOS, and even Apple themselfes do not really support it with their newer Apps (see Notes, for example).
I like BBEdit for writing and my Python stuff. As you know, I’m not a user of Regular Expressions unless absolutely required (spent 2 days messing with a simple one last week!). But from Bare Bones Software | BBEdit Comparison Chart Flexible ‘grep’ style pattern-based search and replace based on “PCRE (the Perl-Compatible Regular Expression library)” if that helps.
Might be worth checking the differences, though. In general, Perl’s REs are the most powerful around. Most every other incarnation is very close to it. And you’re not obliged to use the more esoteric features.
Text Soap is an easy (enough) to use Regex app. It is part of the Setapp group. In some ways, I like it better the BBedit for batch file processing. It is a good companion to both DEVONthink and Obsidian.