Version

menu_open
Replacing Content

The Replace section is the first of three sections in the Batch Rename Settings panel. In this section, users can replace text in object names or notes using very simple to very complex replacement patterns.

To replace content:

  1. Specify in the Apply To list if the rename operation should apply to the listed objects' names or comments.

  2. Select Replace.

  3. Enter the text to find, optionally in the form of a regular expression pattern, in the Find what field.

  4. Enter the replacement text, optionally in the form of a regular expression back reference, in the Replace with field.

  5. Select Match case if you want to set the Find what entry to only find text with the same letter case (upper or lower).

    [Note] Note

    Match case is not applicable to regular expression patterns, which can be set as needed to recognize case.

  6. Select Use Regular Expression if you want Wwise to interpret the Find what and Replace with entries as regular expression syntax.

  7. Specify in the Occurrence list what to do if there is more than one matching occurrence of the specified pattern:

    • First: Include only the first matching occurrence.

    • Last : Include only the last matching occurrence.

    • All: Include every match of the pattern in the object name or comment.

  8. Review your changes then click Rename All to replace the content.

Example: Replacing with regular expressions

Let's take the Wwise Sample Project as an example. In its Actor-Mixer Hierarchy, the MIDI Work Unit has dozens of MIDI objects that are, in part, named by their corresponding absolute note: C00, D00, E00, F00, G00, A01, B01, C02, and so on. But, imagine your project is transferred to your French studio where they use fixed-doh solfège notes: Do, Re, Mi, Fa, Sol, La, Si, Do, and so on. The French studio audio designers will appreciate it if we rename all these objects. Here is how we'd do it:

  1. Press Ctrl and click on the MIDI Work Unit.

    The MIDI Work Unit hierarchy expands, revealing its many objects.

  2. Select all the Kalimba, Sansula, Voice, and Wood Sansula objects in the Project Explorer. Then open the shortcut menu and select Batch Rename....

    The Batch Rename view appears with the selected objects in its Preview panel.

  3. In the Settings panel, if not already done, set Apply To to Name.

    The Preview panel lists the current object names under the Before column.

  4. Enable Replace and, a few rows down, enable Use Regular Expression.

    The Find what and Replace with fields activate, ready to accept and interpret entries as regular expressions.

  5. Enter _C(#?\d{1,2}) in the Find what field. Then click the Preview panel to see the forecast results.

    All objects with names containing _C, with="" or without #, and followed by one or two digits are listed in the After column without these matching characters, prompting an error message, "Resulting name is already used by a sibling object or is otherwise reserved", for a couple of these objects. All other objects list a "No replace match detected" message.

  6. Enter _Do$1 in the Replace with field. Then click the Preview panel to see the forecast results. Instead of just removing the matching C note, the After column now lists Do in the place of the C.

  7. Click Rename All to apply the change.

    For each matching object, names update and a Successfully renamed message displays in the Preview panel.

We would then repeat the operation for the remaining six notes.

The following table gives a more detailed explanation of how our regular expression, _C(#?\d{1,2}), with its replacement, _Do$1, worked.

Before

After

Explanation

VI_VOICE_33_C#6

VI_VOICE_33_Do#6

  • _C literally matches _C in the name, just like a non-regular expression replacement would.

  • #?, zero or one match of #, matches the one instance of #.

  • \d{1,2}, one or two digits, matches the 6.

  • The parentheses around #?\d{1,2} put the matching # and 6 in a group.

In the replacement:

  • The match is replaced by _Do and

  • $1, the first group, whose value is #6.

VI_WOOD_SANSULA_C00_HI

VI_WOOD_SANSULA_Do00_HI

  • _C literally matches _C in the name, just like a non-regular expression replacement would.

  • #?, zero or one match of #, matches zero instances of #.

  • \d{1,2}, one or two digits, matches the 00.

  • The parentheses around #?\d{1,2} put the matching 00 in a group.

In the replacement:

  • The match is replaced by _Do and

  • $1, the first group, whose value is 00.



Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise