# Moving Inbox Notes to specific folders in my DB

**URL:** <https://discourse.devontechnologies.com/t/moving-inbox-notes-to-specific-folders-in-my-db/64441>\
**Category:** DEVONthink\
**Created:** [May 12, 2021, 3:25pm UTC](https://discourse.devontechnologies.com/t/moving-inbox-notes-to-specific-folders-in-my-db/64441 "2021-05-12T15:25:17Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![mhucka](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/mhucka/32/28691_2.png) [@mhucka](https://discourse.devontechnologies.com/u/mhucka)\
**Post date:** [May 12, 2021, 6:32pm UTC](https://discourse.devontechnologies.com/t/moving-inbox-notes-to-specific-folders-in-my-db/64441/9 "2021-05-12T18:32:01Z")

</div>

In this particular case:

- the expression `.*` means “match zero or more characters of any kind” (in other words, match anything/everything)
- parentheses in the search expression means “store the results of the pattern inside the parentheses”, which in this example, is `.*` So, the expression `(.*)` means “match zero or more characters and store the results”.
- the expression `@self(.*)` means “match the sequence of characters that begins with `@self` followed by zero or more characters and store the matched characters after the `@self` part”
- the expression `\1` means “substitute the first parenthesized match”, so in other words, the results of whatever matched `.*`

Basically, the two things work together to do the following:

- look for `@self` in the name and store what comes it
- replace the name with the stuff that came after it

Example: `@self this is my note` becomes `this is my note`.

As to the date part of the rule, what’s happening is not obvious. When DEVONthink executes the actions in the smart rule, it does them in the order listed in the rule. When it gets to the line involving the date, by that time, it has already changed the name of the note to `this is my note`. The value of the _current_ name of the note is accessible using the placeholder _Name_. So, the line involving the date ends up replacing the current name (which by that time has been changed as just described) with a new name that consists of the date followed by that current name.

Example: `this is my note` becomes `2021-05-12 this is my note`.

Important: to insert the placeholder _Name_, control-click your mouse in the field of the dialog box and look for Insert Placeholder in the pop-up contextual menu presented by DEVONthink. (This is the only way to insert placeholders – you can’t type the literal word _Name_ or do anything like that.)

Some information about regular expressions can be found in DEVONthink’s user manual, and there are many resources on the web for learning the syntax.

---

_[View the full topic](https://discourse.devontechnologies.com/t/moving-inbox-notes-to-specific-folders-in-my-db/64441)._
