# Regex and UTF-8 Chars

**URL:** https://forum.kirupa.com/t/regex-and-utf-8-chars/312849
**Category:** flash
**Created:** [August 13, 2010, 9:15pm UTC](https://forum.kirupa.com/t/regex-and-utf-8-chars/312849 "2010-08-13T21:15:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Dan0](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@Dan0](https://forum.kirupa.com/u/Dan0)
#### Post date: [August 13, 2010, 9:15pm UTC](https://forum.kirupa.com/t/regex-and-utf-8-chars/312849/1 "2010-08-13T21:15:48Z")

</div>

Hey guys,  
I’m not too good with regex in flash. Basically I am using UTF-8 characters codes \u0000 to \u0008 as part of a socket server.

I need a little regex pattern to replace these chars with somthing like a $ symbol to make them really obvious (while tracing output etc…).

I believe it should be something like:

```auto
filter:RegExp = new RegExp("[\u0000\u0001\u0002\u00..]");
myNewString = myString.replace(filter, "%")

```

Doesn’t appear to be working at the moment… could anyone shed some light on things?  
Thank you very much for reading,  
Dan 🙂
