Tokens and Patterns
Tokens
Section titled “Tokens”Think of tokens as variables for renaming—they can represent parts of the object’s name or the entire name without requiring you to type them manually. They can also reference the object’s collection name or expand into letters A-Z.
You can mix and match them to create different naming variations.
For example:
$_~1~1 #2 @
Tokens work in name patterns (what you type as the new name), including group comma. They are typed as plain text in prefix/suffix, comma rename, insert text, and the replace side of search and replace.
A token that points to a word or number the name doesn’t have (eg. ~3 on a_b) expands to nothing.
Self Token: $
Section titled “Self Token: $” $ represents the core of the object’s name: characters that aren’t letters (separators and numbers) are trimmed from the start and the end. A number directly attached to the name is kept, eg. Cube1.001 → Cube1. For example:
You can also make $ skip common prefixes and suffixes such as GEO_ or _HI, see $ Expressions.
Self Token: $*
Section titled “Self Token: $*”$* represents the object’s full name. For example:
By using $* , you can add prefix and suffix to the name like so
Collection Token: ;;
Section titled “Collection Token: ;;” ;; represents each object’s collection name. A Blender number suffix on the collection name (eg. .001) is left out.
Word Token: ~n, ~~n, ~~-n
Section titled “Word Token: ~n, ~~n, ~~-n”Note: n == integer number
~1 refers to the first word of the object’s name.
~-1 refers to the last word of the object’s name.
~~1 refers to the first word of the object’s name + its trailing separators
~~-1 refers to the last word of the object’s name + its leading separators
A word is a run of letters and numbers, with the numbers at its start and end left out (eg. V2 gives V, a2b stays a2b). Parts that are only numbers are not words.
The double tilde (~~) includes the word’s trailing separator.
Using a negative number lets you select words from the end of the name, and with the double tilde it targets the leading separator instead of the trailing one.
Number Token: #n, ##n, ##-n
Section titled “Number Token: #n, ##n, ##-n”Note: n == integer number
#1 refers to the first number of the object’s name.
#-1 refers to the last number of the object’s name.
##1 refers to the first number of the object’s name + its trailing separators
##-1 refers to the last number of the object’s name + its leading separators
The double pound (##) includes the number’s trailing separator.
Using a negative number lets you select numbers from the end of the name, and with the double pound it targets the leading separator instead of the trailing one.
Word and number tokens can also be used on the search side of Search and Replace, eg. ~2/Rig.
Regular Expressions
Section titled “Regular Expressions”When tokens aren’t enough for complex naming tasks, you can use regular expressions (regex) to target specific patterns in object names.
- Wrap your regex pattern in curly brackets
{ }. - Text inside the brackets is treated as a regular expression and searched in the object’s current name.
- Use parentheses
( )to capture specific parts of the name. The first capture group is used, or the whole match when there is no group. - Matching is case-sensitive.
v) at the end of the string after an underscore.
Tip: Regular expressions offer great flexibility but require some familiarity with regex syntax.
Need help crafting patterns? Try tools like regex101.com for testing and quick explanations.
Fallback value
Section titled “Fallback value”If the regular expression doesn’t find a match, the object keeps its current name. To use a fallback value instead, add /or:replacement_text/ at the end of the expression.
For example:
Names in Any Language
Section titled “Names in Any Language”Names can use letters of any language, eg. テスト, 腕_L or café. These features treat letters of every script as letters:
- Word tokens ~n and number tokens #n
- ^ in search and replace
- /ss , /lss and /rss
- /cap and /sc
Numbers are the digits 0-9 only. Full-width digits such as 123 count as letters.