Search for number range in pdf text in DT3

Using DT3. Most articles have references, which may contain a date of publication (e.g. Smith, 2000). Is there any way to search for these “dates” which are just numbers as a range. i.e. I want to find all references containing the numbers from e.g. 2000 - 2014 (one way is 2000|2001|2002|…|2014) but that is labor intensive and it does not allow for searching for all numbers < 2000. In some instances, there will be a lot of junk, but when I get to the bibliography I will be able to see those docs highlighted that were published in the range 2000 - 2014. They are not dates, in the sense of yyyy/mm/dd, but usually just the year, and they are not identified asf such, so searching for a date doesn’t work.
Is this possible.
Thanks
Don Spady

No, there is no such range parameter for text.

I want to find all references containing the numbers from e.g. 2000 - 2014

Unless there was only one occurrence of a year in the document, you’re not going to get very accurate matches doing a database search. A document could have 2012, another Published: 2012, a third Pub: 2012, and a fourth Some years ago, I rode a horse. It was in spring of 2012., etc. All those documents would technically match in a text-based search for 2012.

Thanks. I think you have answered my question, but also misinterpreted it, because of my lack of clarity. I want to find any number within a given range IN ONE document, NOT the whole database. A single document might contain references published from e.g., 1950 to 2023 and I am interested only in those published after e.g. 2005. So, this is a search within a single document, for references published within a specific time frame, not a bunch of documents.
At any rate, sounds like it is not doable.
Don

A regular expression might be crafted, eg
2(00[6-9]|0[1-9]\d|[1-9]\d\d) to find all occurrences of numbers > 2000 (but less than 3000). But then you only know that numbers in that range exist in the document, not which ones nor where they occur. To achieve that, you’d have to highlight all these matches. Again: feasible, but not for the faint of heart. Some scripting and ObjC bridging required.

You’re not going to get such a limited range with a simplified set of search operators.

The closest simple one would be 20[01][0-9], so it’s…
Match 20
Match 0 or 1
Match 0 through 9.

This matches 2000 through 2019.

You can’t limit the last range to [0-4] as that would remove 2005 through 2009 from the results.

And notice it did not match the 2020 in the first line,

Both the toolbar search and optionally the search inspector support wildcards & operators, therefore this will find all years from 2000 to 2014:

200[0-9] || 201[0-4]

And this will accept all years in the 20th & 21st century:

20[01][0-9] || 202[0-3] || 19[0-9][0-9]

To ensure that it’s really a date would be much more tricky as dates can have all kinds of formats or is it always the same format?

1 Like

Thank you!. This “200[0-9]” works beautifully and is just what I want. I also tried 199? or 20?? or 201? and that also does the job, but the 200[0-9] seems more elegant and specific.

Many thanks for your help.
Don