# Regex Rename Simplification

**URL:** https://resource.dopus.com/t/regex-rename-simplification/38684
**Category:** Help & Support
**Created:** [June 10, 2021, 8:37am UTC](https://resource.dopus.com/t/regex-rename-simplification/38684 "2021-06-10T08:37:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Zion](https://resource.dopus.com/user_avatar/resource.dopus.com/zion/32/44060_2.png) [@Zion](https://resource.dopus.com/u/Zion)
#### Post date: [June 10, 2021, 8:37am UTC](https://resource.dopus.com/t/regex-rename-simplification/38684/1 "2021-06-10T08:37:14Z")

</div>

Greetings Gurus, I have a REGEX rename to replace odd characters from a filename with spaces (except periods within numeric strings).  
Currently I have two lines.  
Can this be done in one line? Does it impact performance to have two regular expression renames back to back.

```nohighlight
Rename REGEXP PATTERN="(.*)(\[[0-9]*\]|_| +|-|\([0-9]*\))(.*)(.*\..*)#" to="\1 \3\4" AUTORENAME TYPE=files
Rename REGEXP PATTERN="(.*)(?<!\d)\.|\.(?!\d)(.*)(.*\..*)#" to="\1 \3\4" AUTORENAME TYPE=files

```

---

<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: [June 10, 2021, 8:54am UTC](https://resource.dopus.com/t/regex-rename-simplification/38684/2 "2021-06-10T08:54:06Z")

</div>

> [@Zion](#):
>
> Does it impact performance to have two regular expression renames back to back.

You'll rename every file twice instead of once,.so it'll.take twice as long.

You can use a simple rename script to apply multiple regex (or other transformations) to each file. That's easier than trying to combine two regex which are already complex.
