# Regular Expressions

**URL:** https://community.mp3tag.de/t/regular-expressions/521
**Category:** Howto
**Created:** [October 16, 2003, 4:47pm UTC](https://community.mp3tag.de/t/regular-expressions/521 "2003-10-16T16:47:29Z")
**Posts on this page:** 1
**Showing post:** 41

<div class="post-metadata">

### Author: ![Zoofield](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zoofield/32/136_2.png) [@Zoofield](https://community.mp3tag.de/u/Zoofield)
#### Post date: [June 10, 2011, 7:17pm UTC](https://community.mp3tag.de/t/regular-expressions/521/41 "2011-06-10T19:17:53Z")

</div>

I could not get, "DetlevD - [Splitting an Upper Camel Case string](https://community.mp3tag.de/t/521/33)" to work, although I like the idea!

These together:

```
RE:Adds a space between Capital and lowercase letter or digit behind it.
Field:_Tag
re:([^A-Z\W\_])([A-Z])(?=[^A-Z])
($1) ($2)

RE:Adds a space between Digit and lower case letter behind it
Field:_Tag
re:([^\W\d\_])(\d)
($1) ($2)

```

Will...

**Example.  
From:  
"ThisIsThe2ndSongFromD.D.'sFirstAlbum30YearsAgo."  
To:  
"This Is The 2nd Song From D.D.'s First Album 30 Years Ago."**

This is the two above combined:

```
RE:Adds a space between, Capital and lowercase letter or digit behind it, Digit and lower case letter behind it.
Field:_Tag
re:([^A-Z\W\_])([A-Z])(?=[^A-Z])|([^\W\d\_])(\d)
$1$3 $2$4

```

Does the same except in the case of...

**CapitalWord9CapitalWord2ndSong30Years**

Example.  
First pass will: **Capital Word9 Capital Word 2nd Song 30 Years**  
Second pass will: **Capital Word 9 Capital Word 2nd Song 30 Years**  
Third pass will: **Reveal A Latent O.C. Disorder**

Because the single digit ' **9**' in the example can only be captured once per pass per replacement.

I would use the first set for completeness and through the "Action Groups".  
I would use the Second for brevity and through "Actions (Quick)"

---

_[View the full topic](https://community.mp3tag.de/t/regular-expressions/521)._
