# \#regex

**URL:** https://resource.dopus.com/tag/regex/3.md

[Latest](https://resource.dopus.com/latest.md) · [Categories](https://resource.dopus.com/categories.md) · [Tags](https://resource.dopus.com/tags.md)

---

## [Column - Custom Text and Regexp](https://resource.dopus.com/t/column-custom-text-and-regexp/18727)

<div class="topic-metadata">

**Author:** [@wowbagger](https://resource.dopus.com/u/wowbagger)\
**Replies:** 42\
**Last updated:** [August 13, 2026, 9:19pm UTC](https://resource.dopus.com/t/column-custom-text-and-regexp/18727 "2026-08-13T21:19:00Z")

</div>

This script adds support for creating custom columns using regexp against the file name and path. The columns are configured using a dialog, with all Dopus column types and custom column settings being supported. Exampl…

---

## [Various simple rename presets](https://resource.dopus.com/t/various-simple-rename-presets/3297)

<div class="topic-metadata">

**Author:** [@Leo](https://resource.dopus.com/u/Leo)\
**Replies:** 25\
**Last updated:** [February 22, 2026, 1:58am UTC](https://resource.dopus.com/t/various-simple-rename-presets/3297 "2026-02-22T01:58:34Z")

</div>

The Rename dialog in Directory Opus lets you store presets which you can re-use to perform common rename tasks. It's also possible to import and export these presets to share them with other people. Opus 12 example: O…

---

## [Remove All After](https://resource.dopus.com/t/remove-all-after/24194)

<div class="topic-metadata">

**Author:** [@myarmor](https://resource.dopus.com/u/myarmor)\
**Replies:** 8\
**Last updated:** [April 11, 2025, 4:48am UTC](https://resource.dopus.com/t/remove-all-after/24194 "2025-04-11T04:48:14Z")

</div>

This rename preset requires DOpus 12 (or later). Overview: Removes everything after the matched text (not including the fileextension). Very useful to quickly remove random “garbage” from filenames. Adds an extra fiel…

---

## [RegEx parsing syntax highlight error in JScript editor?](https://resource.dopus.com/t/regex-parsing-syntax-highlight-error-in-jscript-editor/52168)

<div class="topic-metadata">

**Author:** [@svArt](https://resource.dopus.com/u/svArt)\
**Replies:** 3\
**Last updated:** [August 7, 2024, 10:35pm UTC](https://resource.dopus.com/t/regex-parsing-syntax-highlight-error-in-jscript-editor/52168 "2024-08-07T22:35:11Z")

</div>

RegEx literals like /^\\w+:\\/\\// render as ending with a comment, even though the second to last slash is escaped. AFAICT, this doesn't interfere with the actual running of the script. Compare to the visually correctl…

---

## [RegExp to capitalize all words in filename, without modifying existing camelCase or HumpCase words](https://resource.dopus.com/t/regexp-to-capitalize-all-words-in-filename-without-modifying-existing-camelcase-or-humpcase-words/46680)

<div class="topic-metadata">

**Author:** [@danielmonk](https://resource.dopus.com/u/danielmonk)\
**Replies:** 2\
**Last updated:** [October 28, 2023, 5:09pm UTC](https://resource.dopus.com/t/regexp-to-capitalize-all-words-in-filename-without-modifying-existing-camelcase-or-humpcase-words/46680 "2023-10-28T17:09:42Z")

</div>

Can anyone please help me out with an RegExp rename example to capitalize all the words in a filename, but without modifying existing camelCase or HumpCase words? this is partOne and this is PartTwo.ext --\> This Is par…

---

## [RegEx: Can you rename a File with a part of the Parent Folder name?](https://resource.dopus.com/t/regex-can-you-rename-a-file-with-a-part-of-the-parent-folder-name/41621)

<div class="topic-metadata">

**Author:** [@dix-hill](https://resource.dopus.com/u/dix-hill)\
**Replies:** 4\
**Last updated:** [July 3, 2022, 8:26pm UTC](https://resource.dopus.com/t/regex-can-you-rename-a-file-with-a-part-of-the-parent-folder-name/41621 "2022-07-03T20:26:23Z")

</div>

In Advanced Rename, I'm trying to use RegEx to capture part of the Parent Name and append it to the Original File Name. Old Name: ^.\*\\\\(\\\[.\*?\\\]).\[^\\\[\]+(\\\[.\*\\\])\\\\.\* New Name: \\1 {name} \\2 It seems to work on RegEx101…

---

## [Text Replace for folder path copied](https://resource.dopus.com/t/text-replace-for-folder-path-copied/40055)

<div class="topic-metadata">

**Author:** [@Bryan.H](https://resource.dopus.com/u/Bryan.H)\
**Replies:** 16\
**Last updated:** [May 2, 2022, 10:43am UTC](https://resource.dopus.com/t/text-replace-for-folder-path-copied/40055 "2022-05-02T10:43:27Z")

</div>

Hi, Dears, I am asking for a quick help: I want to achieve that maybe I can set up a new button in DOpus and it'll copy the current file/folder's full path, but replace my username part into a general approach, i.e. cha…

---

## [\\p{Han} or \\p{script=Han} regex for Chinese not functioning](https://resource.dopus.com/t/p-han-or-p-script-han-regex-for-chinese-not-functioning/39677)

<div class="topic-metadata">

**Author:** [@Aphidx](https://resource.dopus.com/u/Aphidx)\
**Replies:** 1\
**Last updated:** [October 24, 2021, 12:46pm UTC](https://resource.dopus.com/t/p-han-or-p-script-han-regex-for-chinese-not-functioning/39677 "2021-10-24T12:46:40Z")

</div>

The subject basically says, the character class shortcut for the Chinese (han) don't appear functional. Am I using the wrong syntax for dopus or is this feature not supported? Cheers/

---

## [Match all after 8 or 11 characters](https://resource.dopus.com/t/match-all-after-8-or-11-characters/39422)

<div class="topic-metadata">

**Author:** [@tezcan](https://resource.dopus.com/u/tezcan)\
**Replies:** 1\
**Last updated:** [September 28, 2021, 1:04pm UTC](https://resource.dopus.com/t/match-all-after-8-or-11-characters/39422 "2021-09-28T13:04:47Z")

</div>

Hi, I am trying to match and get all words after a 8 or 11 character word, but i am stuck. Form has a field which can have digits or alphanumeric characters. I can solve this by using : (?\<=\\d{9}).\* But I can get …

---

## [XTag - A command which simplifies filename tagging and rating](https://resource.dopus.com/t/xtag-a-command-which-simplifies-filename-tagging-and-rating/35844)

<div class="topic-metadata">

**Author:** [@apocalypse](https://resource.dopus.com/u/apocalypse)\
**Replies:** 0\
**Last updated:** [June 11, 2020, 4:53pm UTC](https://resource.dopus.com/t/xtag-a-command-which-simplifies-filename-tagging-and-rating/35844 "2020-06-11T16:53:40Z")

</div>

= About === After a few years of internal use I decided to share this command which makes my life a lot easier when managing my files. It appends tags to filenames themselves so don't use it if those files' filenames are…

---

## [Need some help with regex and replace renaming](https://resource.dopus.com/t/need-some-help-with-regex-and-replace-renaming/35665)

<div class="topic-metadata">

**Author:** [@AnimusAstralis](https://resource.dopus.com/u/AnimusAstralis)\
**Replies:** 1\
**Last updated:** [May 26, 2020, 2:14pm UTC](https://resource.dopus.com/t/need-some-help-with-regex-and-replace-renaming/35665 "2020-05-26T14:14:20Z")

</div>

I have some folders named in the following fashion: Artist 1 - 1999 - Album Title 1 Artist 2 - 2000 - Album Title 2 I want to rename them by replacing the first hyphen - with \[Album\]: Artist 1 \[Album\] 1999 - Album Tit…

---

## [Rename Files with Captured Text from Path with Regex](https://resource.dopus.com/t/rename-files-with-captured-text-from-path-with-regex/35358)

<div class="topic-metadata">

**Author:** [@Xochipelli](https://resource.dopus.com/u/Xochipelli)\
**Replies:** 5\
**Last updated:** [May 1, 2020, 2:30pm UTC](https://resource.dopus.com/t/rename-files-with-captured-text-from-path-with-regex/35358 "2020-05-01T14:30:24Z")

</div>

I was largely able to find what I was looking Using Advanced Rename with "Regular Expressions + Find and Replace" SEARCH: ^ REPLACE: {parent}. In this case my parent folder names were a simple \\d\\d filename Assuming…

---

## [RegexColumnsReloaded (easily add regex columns or any kind of column)](https://resource.dopus.com/t/regexcolumnsreloaded-easily-add-regex-columns-or-any-kind-of-column/20799)

<div class="topic-metadata">

**Author:** [@playful](https://resource.dopus.com/u/playful)\
**Replies:** 7\
**Last updated:** [January 26, 2020, 2:27pm UTC](https://resource.dopus.com/t/regexcolumnsreloaded-easily-add-regex-columns-or-any-kind-of-column/20799 "2020-01-26T14:27:34Z")

</div>

There have been several regex column scripts in the past year. I was first wow'ed by this feature when I came across wowbagger's script. Since then, I have been experimenting with columns and writing several scripts to …

---

## [Rename script to change multiple variables including 24 hour time](https://resource.dopus.com/t/rename-script-to-change-multiple-variables-including-24-hour-time/33890)

<div class="topic-metadata">

**Author:** [@MrKuenning](https://resource.dopus.com/u/MrKuenning)\
**Replies:** 5\
**Last updated:** [November 7, 2019, 7:42am UTC](https://resource.dopus.com/t/rename-script-to-change-multiple-variables-including-24-hour-time/33890 "2019-11-07T07:42:01Z")

</div>

I use Opus to rename thousands of files but I have up to now mostly stuck with the built-in renaming options. I am trying to take a stab at a script that will change multiple parts of a filename in one go and could use …

---

## [Modify Capitalisation of Just Part of Filename](https://resource.dopus.com/t/modify-capitalisation-of-just-part-of-filename/32958)

<div class="topic-metadata">

**Author:** [@default300](https://resource.dopus.com/u/default300)\
**Replies:** 7\
**Last updated:** [June 29, 2019, 1:05am UTC](https://resource.dopus.com/t/modify-capitalisation-of-just-part-of-filename/32958 "2019-06-29T01:05:42Z")

</div>

Hi. I would like to modify the capitalisation of just part of a filename (not the entire filename). I know that, if I want to modify the capitalisation of the entire string, I can do that using the Modify Capitalizatio…

---

## [Regex Capture Replacement (Case Conversion etc)](https://resource.dopus.com/t/regex-capture-replacement-case-conversion-etc/31644)

<div class="topic-metadata">

**Author:** [@smallscript](https://resource.dopus.com/u/smallscript)\
**Replies:** 1\
**Last updated:** [February 20, 2019, 10:59pm UTC](https://resource.dopus.com/t/regex-capture-replacement-case-conversion-etc/31644 "2019-02-20T22:59:43Z")

</div>

While working with regex, I was trying to change the capitalization of the capture-results. But could not find a variation of the syntax that supported this. DOpus: regex reference. General: regex reference - on this s…

---

## [Removing a leading space now introduces a tilde (~) using RegEx](https://resource.dopus.com/t/removing-a-leading-space-now-introduces-a-tilde-using-regex/30419)

<div class="topic-metadata">

**Author:** [@insolution](https://resource.dopus.com/u/insolution)\
**Replies:** 2\
**Last updated:** [November 7, 2018, 5:45am UTC](https://resource.dopus.com/t/removing-a-leading-space-now-introduces-a-tilde-using-regex/30419 "2018-11-07T05:45:52Z")

</div>

I occasionally find files that have a leading space in the file name. I used\* to use the following regex rename to delete the leading space: Type: Regular Expression Find and Replace From: ^\[space\] or \[^\\s\] To: \<null\> …

---

## [Rename RegEx works on Files but not Directories](https://resource.dopus.com/t/rename-regex-works-on-files-but-not-directories/30418)

<div class="topic-metadata">

**Author:** [@insolution](https://resource.dopus.com/u/insolution)\
**Replies:** 2\
**Last updated:** [November 5, 2018, 3:07pm UTC](https://resource.dopus.com/t/rename-regex-works-on-files-but-not-directories/30418 "2018-11-05T15:07:50Z")

</div>

I use the following rename preset on files to reorder based on where a hyphen falls in the name. For example, Type: Regular Expression From (.\*) - (.\*) - (.\*)\\.(.\*) To \\2 - \\3 - \\1.\\4 Example From: \[Author - Title - …

---

## [Ampersand & in REgex rename](https://resource.dopus.com/t/ampersand-in-regex-rename/29295)

<div class="topic-metadata">

**Author:** [@slouw](https://resource.dopus.com/u/slouw)\
**Replies:** 3\
**Last updated:** [July 18, 2018, 11:41pm UTC](https://resource.dopus.com/t/ampersand-in-regex-rename/29295 "2018-07-18T23:41:07Z")

</div>

I have searched around only found this I think think is not relevant. I have used this rename command happily for some time. It pops up a dialog box for some text and adds the text as a suffic to the highlighted file(s…

---

## [RegEx in rename script (remove second extension)](https://resource.dopus.com/t/regex-in-rename-script-remove-second-extension/29364)

<div class="topic-metadata">

**Author:** [@MartO](https://resource.dopus.com/u/MartO)\
**Replies:** 5\
**Last updated:** [July 18, 2018, 8:50am UTC](https://resource.dopus.com/t/regex-in-rename-script-remove-second-extension/29364 "2018-07-18T08:50:53Z")

</div>

Hi all, I've started fiddling around with DO again... Currently I'm working on a JS rename button to remove an additional (!) ".bak" extension that has been slapped on to my files. So I want this: test1.txt -\> tes…

---

## [Script to perform multiple Regular Expressions](https://resource.dopus.com/t/script-to-perform-multiple-regular-expressions/3384)

<div class="topic-metadata">

**Author:** [@Leo](https://resource.dopus.com/u/Leo)\
**Replies:** 2\
**Last updated:** [July 17, 2018, 9:02pm UTC](https://resource.dopus.com/t/script-to-perform-multiple-regular-expressions/3384 "2018-07-17T21:02:14Z")

</div>

Introduction It's fairly common to want to apply several regular expressions to a filename, one after another. While you can do this using several Rename commands in a row, that isn't ideal. Using multiple Rename comma…

---

## [Copy File URL, but output filename?](https://resource.dopus.com/t/copy-file-url-but-output-filename/29262)

<div class="topic-metadata">

**Author:** [@Simplie](https://resource.dopus.com/u/Simplie)\
**Replies:** 7\
**Last updated:** [July 3, 2018, 7:19am UTC](https://resource.dopus.com/t/copy-file-url-but-output-filename/29262 "2018-07-03T07:19:13Z")

</div>

I'm trying to bind a key to copy URL's from specific files, but the code I have outputs the full path as text. Is there a way to just show the original file name as text but keep the hyperlink? Also, I like showing the…

---

## [Dots to spaces except in numbers. (For files and folders.)](https://resource.dopus.com/t/dots-to-spaces-except-in-numbers-for-files-and-folders/6599)

<div class="topic-metadata">

**Author:** [@Leo](https://resource.dopus.com/u/Leo)\
**Replies:** 1\
**Last updated:** [August 30, 2017, 9:10pm UTC](https://resource.dopus.com/t/dots-to-spaces-except-in-numbers-for-files-and-folders/6599 "2017-08-30T21:10:42Z")

</div>

This post presents two ways to achieve this type of rename: \[Dots\_to\_spaces\_except\_in\_numbers\_purpose\] Dots in the name will be turned into spaces except if they are in between numbers (like in a version number). For f…

---

## [Rename to and from CamelCase](https://resource.dopus.com/t/rename-to-and-from-camelcase/22983)

<div class="topic-metadata">

**Author:** [@playful](https://resource.dopus.com/u/playful)\
**Replies:** 7\
**Last updated:** [October 30, 2016, 1:31pm UTC](https://resource.dopus.com/t/rename-to-and-from-camelcase/22983 "2016-10-30T13:31:32Z")

</div>

Rename TO CamelCase: EDIT: greatly simplified the code to make it more useful as a learning tool. The following rename script is fully explained on this page about DO12 rename scripting. The script’s goal is to convert…

---

## [Simple mp3 file renumbering](https://resource.dopus.com/t/simple-mp3-file-renumbering/20590)

<div class="topic-metadata">

**Author:** [@martinjh99](https://resource.dopus.com/u/martinjh99)\
**Replies:** 4\
**Last updated:** [May 14, 2015, 5:57am UTC](https://resource.dopus.com/t/simple-mp3-file-renumbering/20590 "2015-05-14T05:57:18Z")

</div>

Simple little regexp to rename mp3 files with track first filenames… given the following filenames: 01 - Artist - track.mp3 02 - Artist - track.mp3 03 - Artist - track.mp3 It will change the number to whatever you p…

---

## [RegExColumns V2](https://resource.dopus.com/t/regexcolumns-v2/19530)

<div class="topic-metadata">

**Author:** [@Miran](https://resource.dopus.com/u/Miran)\
**Replies:** 10\
**Last updated:** [February 23, 2015, 9:51am UTC](https://resource.dopus.com/t/regexcolumns-v2/19530 "2015-02-23T09:51:31Z")

</div>

Overview This is a new Version of my RegExColumns Script using the multi line script config for the RegExColumns Definition. There is no need to edit the actual script anymore. Installation Open Preferences / Toolbar…

---

## [A few advanced RegExp Renames](https://resource.dopus.com/t/a-few-advanced-regexp-renames/12690)

<div class="topic-metadata">

**Author:** [@David](https://resource.dopus.com/u/David)\
**Replies:** 1\
**Last updated:** [August 31, 2017, 6:14pm UTC](https://resource.dopus.com/t/a-few-advanced-regexp-renames/12690 "2017-08-31T18:14:24Z")

</div>

Note for Opus 12 & above: The examples below were made for older versions of Opus, where renames using regular expressions had to take care of file extensions themselves. This is why each example below has at least tw…

---

## [Remove Brackets](https://resource.dopus.com/t/remove-brackets/11861)

<div class="topic-metadata">

**Author:** [@elypter](https://resource.dopus.com/u/elypter)\
**Replies:** 0\
**Last updated:** [October 2, 2011, 11:23am UTC](https://resource.dopus.com/t/remove-brackets/11861 "2011-10-02T11:23:09Z")

</div>

These are based on solutions from the Rename - remove everything in bracket Help & Support thread. Remove Brackets: It deletes all () & \[\] brackets with its contents in a file name e.g. fo\[oooo\]o.bar =\> foo.bar \[200dp…

---

## [Music File Cleanup: Remove '\_', move to artist folder, Add '-' after #](https://resource.dopus.com/t/music-file-cleanup-remove---move-to-artist-folder-add-after/10553)

<div class="topic-metadata">

**Author:** [@raydiognome](https://resource.dopus.com/u/raydiognome)\
**Replies:** 0\
**Last updated:** [April 16, 2011, 8:21pm UTC](https://resource.dopus.com/t/music-file-cleanup-remove---move-to-artist-folder-add-after/10553 "2011-04-16T20:21:01Z")

</div>

Thanks to EVERYONE and especially Leo, I’ve modified Leo’s examples for creating folders, as well as borrowing parts and pieces to create this mutation that will: Remove underscores. Adds a dash between the track numbe…

---

## [Add Spaces to every dash in a file name](https://resource.dopus.com/t/add-spaces-to-every-dash-in-a-file-name/7741)

<div class="topic-metadata">

**Author:** [@KingOfDaClick](https://resource.dopus.com/u/KingOfDaClick)\
**Replies:** 2\
**Last updated:** [April 15, 2009, 10:43am UTC](https://resource.dopus.com/t/add-spaces-to-every-dash-in-a-file-name/7741 "2009-04-15T10:43:54Z")

</div>

Hi All I’ve modified Leo’s Dot’s to spaces vbscript slightly to make it add a space before and after every dash in a file name. For example, say you have a music album that has: 01-Michael Jackson-Billie Jean.mp3 02…

[Next page](https://resource.dopus.com/tag/regex/3.md?match_all_tags=true&page=1&tags%5B%5D=regex)
