Item names preceded by a number in parentheses

I see a lot of item names (profiles dragged in from Linkedin) preceded by numbers in parentheses, like this: “(2) John Smith.” Most names have no number, many have a one, fewer have a two, and so on. What does the number or lack of a number signify?

I’ve ignored it until now because it seemed to make no difference. But today I found a duplicate that was not in a smart group that looked for duplicates. For example, “John Smith” in one group and “(1) John Smith” in another group, and neither in the smart group. That’s a problem.

What does the number signify?

A screen capture would be helpful.

1 Like

DEVONthink doesn’t add such a prefix, it’s probably the name that was received when dropping.

1 Like

YouTube does something similar, and in that case it seems the number is the number of recent videos from channels I have subscribed to. It even appears when I clip web locations to DT. So I guess it is just information that the website is providing.

2 Likes

Thanks for your replies. And here’s a screenshot of the relevant parts.

image

Yep. Done by the web site. See @mbbntu above.

1 Like

Interesting, but inconvenient. It circumvents detection of duplicates. It would be good if DTP had a tag or something to strip out such info, or is there such a thing already?

A smart rule can handle this.

Screenshot 2023-08-18 at 2.17.56 PM

Screenshot 2023-08-18 at 2.18.26 PM

2 Likes

Ah! Excellent! Thank you, Bluefrog!

You’re welcome :slight_smile:

Do note that’s a simple example and approach. It could be more precisely done with regular expressions, if the need was there.

I suppose that need will arise sooner or later, which will force me to dive into regex again. Tricky, but ultimately rewarding. :slightly_smiling_face:

^\(\d+\) will match all parenthesized numbers at the beginning of a string.
^\(\d+\)\s+(.*) will store everything after that (excluding whitespace) in capturing group 1, so that you can use \1 in the “Change name” action to get the name with the leading stuff removed.

That, however, does not yet improve on @bluefrog’s solution, which requires a lot less typing.

2 Likes

Thank you very much for this solution. I’ve struggled with this problem, not even knowing how to ask the question. Eventually, I asked a Chatbot, which told me, and even wrote me a Chrome Extension to delete it from the page name. I haven’t installed it yet, because it goes beyond my knowledge level. This is much preferable.

Thanks again.