# RegExp Substitution

**URL:** <https://forum.kirupa.com/t/regexp-substitution/248140>\
**Category:** flash\
**Created:** [January 4, 2008, 9:05am UTC](https://forum.kirupa.com/t/regexp-substitution/248140 "2008-01-04T09:05:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmintmier](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@kmintmier](https://forum.kirupa.com/u/kmintmier)\
**Post date:** [January 4, 2008, 9:05am UTC](https://forum.kirupa.com/t/regexp-substitution/248140/1 "2008-01-04T09:05:49Z")

</div>

Without resorting to the use of String.toUpperCase(), is there a good way to accomplish the following with an AS3 RegExp?

```auto
tr/[a-z]/[A-Z]/

```

I’ve tried (and failed so far) using a RegExp in conjunction with String.replace(). Has anyone been able to accomplish traditional regex substitution or translation? It seems like the second parameter to String.replace() would also have to be a RegExp.
