DT Wildcards

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.

TIA
–Tim

RegEx is not built in so you have to read the Help and think around the corner. This will work…


[0-9][0-9][0-9][0-9]+[0-9][0-9]+[0-9][0-9]

Ah thank you! I’d tried something like that with hyphens but didn’t think to use “+” like that.

Full RegEx in DTPO would be a godsend…

For the 14 people who’d use it :mrgreen: People complain about DEVONthink’s “steep learning curve” but having to explain RegEx to someone too? :open_mouth: :laughing:

(Honestly, I’d like it myself too, and ask every so often. Hahaha!)

3 Likes

Here’s a big +1 for that. RegEx is so useful and likely to be used by more people than you think. Put this on The List please!

3 Likes

Actually, this is likely not true but the request is noted.

I’ll plus one on RegEx!!

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…]

Is there any update on this? no full support for Regex? it is very limiting having to go through all this steep learning curve with DT and missing a fundamental such as Regex is not supported

Surely it isn’t harder to learn RegEx than to learn Applescript - lots of us seem to use scripts to some extent.

I would bet large sums of money that yes, RegEx is harder to learn than AppleScript. Most of UNIX is not simple to learn.

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 :wink: 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).

And another thing edging me closer to getting BBEdit. Damn :crazy_face: Does BBEdit happen to use the same incarnation of RegEx as does sed?

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.

cheers - sed uses BRE, so no luck there :slight_smile:

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.

1 Like