# A few advanced RegExp Renames

**URL:** https://resource.dopus.com/t/a-few-advanced-regexp-renames/12690
**Category:** Rename Presets
**Tags:** regex, commands
**Created:** [March 17, 2012, 1:58am UTC](https://resource.dopus.com/t/a-few-advanced-regexp-renames/12690 "2012-03-17T01:58:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![David](https://resource.dopus.com/user_avatar/resource.dopus.com/david/32/51561_2.png) [@David](https://resource.dopus.com/u/David)
#### Post date: [March 17, 2012, 1:58am UTC](https://resource.dopus.com/t/a-few-advanced-regexp-renames/12690/1 "2012-03-17T01:58:28Z")

</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 two commands, one for files (with extensions) and one for folders (without extensions).

Now back to the original post by David:

* * *

I haven't been active with the forum for quite some time,  
but I think it may be a good time to post a few advanced RegExp renames I have here.  
If you can better these, please let us know !  
Leo knew of at least two of these a few years ago , via our private e-mails at that time.

Ellipsis refers to multiple '(' , '[' , '-' characters. [[[]]] , (( )) , etc.

1. Rename dots to spaces, except in numbers , but keep ellipsis, ... , and collapse multiple spaces.

2. Add spaces around '-' characters, but keep ellipsis, --- , and collapse multiple spaces.

3. Add space to inside of '(' and ')' characters, but keep ellipsis, ((( or ))) , and collapse multiple spaces.

4. Add space to inside of '[' and ']' characters, but keep ellipsis, [[[or]]] , and collapse multiple spaces.

And here's an example that is renamed under all of these one at a time.

- GPSoftware--[[(((Directory Opus-99.0.7.3)x256 )(Jonathan.Potter, Leo.Davidson, Greg.Perry ))(The world's ...complete file management solution)].txt

Using 1) this becomes ...

- GPSoftware--[[(((Directory Opus-99.0.7.3)x256 )(Jonathan Potter, Leo Davidson, Greg Perry ))(The world's ... complete file management solution)].txt

Then using 2) this becomes ...

- [[(((Directory Opus - 99.0.7.3)x256 )(Jonathan Potter, Leo Davidson, Greg Perry ))(The world's ... complete file management solution)].txt

Then using 3) this becomes ...

- GPSoftware -- [[((( Directory Opus - 99.0.7.3 )x256 )( Jonathan Potter, Leo Davidson, Greg Perry ))( The world's ... complete file management solution )].txt

Then using 4) this becomes ...

- GPSoftware -- [[((( Directory Opus - 99.0.7.3 )x256 )( Jonathan Potter, Leo Davidson, Greg Perry ))( The world's ... complete file management solution )].txt

The ]'s are intentionally left unbalanced here just as example.

Regards,  
Dave

I'm Dave in Green Bay , Wi ( or Michigan's UP )  
USA

---

<div class="post-metadata">

### Author: ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)
#### Post date: [August 31, 2017, 6:14pm UTC](https://resource.dopus.com/t/a-few-advanced-regexp-renames/12690/6 "2017-08-31T18:14:24Z")

</div>

(Dummy reply to fix a forum issue.)
