# RegExp: Remove All Non-alphanumeric

**URL:** https://forum.kirupa.com/t/regexp-remove-all-non-alphanumeric/308599
**Category:** Uncategorized
**Created:** [April 26, 2010, 7:31pm UTC](https://forum.kirupa.com/t/regexp-remove-all-non-alphanumeric/308599 "2010-04-26T19:31:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![audiohominis](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@audiohominis](https://forum.kirupa.com/u/audiohominis)
#### Post date: [April 26, 2010, 7:31pm UTC](https://forum.kirupa.com/t/regexp-remove-all-non-alphanumeric/308599/1 "2010-04-26T19:31:04Z")

</div>

'Sup guys.

I came across a rather sleek [.NET example](http://mundeep.wordpress.com/2008/03/07/remove-non-alphanumeric-characters-from-a-string/) of using a regular expression to strip a string of non-alphanumeric characters:

```auto
Regex.Replace(stringToCleanUp, "[\W]", "");

```

- and I was wondering if it’d be possible to achieve that is AS3 with similar elegance.  
Thanks.  
[COLOR=Red] **UPDATE:** [/COLOR][http://www.kirupa.com/forum/showthread.php?t=333584](http://www.kirupa.com/forum/showthread.php?t=333584)
