# Regular expression to convert case to Case, with exceptions

**URL:** https://community.mp3tag.de/t/regular-expression-to-convert-case-to-case-with-exceptions/6357
**Category:** Support
**Created:** [March 1, 2008, 4:30am UTC](https://community.mp3tag.de/t/regular-expression-to-convert-case-to-case-with-exceptions/6357 "2008-03-01T04:30:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![egd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@egd](https://community.mp3tag.de/u/egd)
#### Post date: [March 1, 2008, 4:30am UTC](https://community.mp3tag.de/t/regular-expression-to-convert-case-to-case-with-exceptions/6357/1 "2008-03-01T04:30:03Z")

</div>

Hi

Any idea how best to implement a regular expression or action to convert all words in all fields to "First Letter Caps" (other than the following [a, an, the, and, but, or, as, at, by, for, in, of, on, to], unless they are first word in the string)?

Thanks

---

<div class="post-metadata">

### Author: ![egd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/e/3da27b/32.png) [@egd](https://community.mp3tag.de/u/egd)
#### Post date: [March 1, 2008, 5:11am UTC](https://community.mp3tag.de/t/regular-expression-to-convert-case-to-case-with-exceptions/6357/2 "2008-03-01T05:11:57Z")

</div>

I think I've solved it, thx.

Field: \_ALL  
RegEx: \s(a|an|and|as|at|by|but|for|in|of|on|or|out|the|to)(?=\s)  
Replace matches with: $lower($0)

If you combine that with a Mixed Case Conversion action you pretty much end up with artist names, song titles and filenames formatted just how I like them 🙂

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:20pm UTC](https://community.mp3tag.de/t/regular-expression-to-convert-case-to-case-with-exceptions/6357/3 "2026-02-09T12:20:48Z")

</div>


