# Help with regular expressions

**URL:** <https://forum.kirupa.com/t/help-with-regular-expressions/295180>\
**Category:** flash\
**Created:** [August 26, 2009, 11:45am UTC](https://forum.kirupa.com/t/help-with-regular-expressions/295180 "2009-08-26T11:45:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Burvs](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@Burvs](https://forum.kirupa.com/u/Burvs)\
**Post date:** [August 26, 2009, 11:45am UTC](https://forum.kirupa.com/t/help-with-regular-expressions/295180/1 "2009-08-26T11:45:14Z")

</div>

Hi all,

I’m trying to use regular expressions with the String.replace() method to manipulate a string to replace all instances of a forward slash “/” with a period “.”

So for instance, if I start with this String:  
“things/stuff/cheese/yum”

I want to convert it to:  
“things.stuff.cheese.yum”

Easy enough if I want to replace a letter… let’s say I wanted to replace all instances of the letter “e”, I would do this:

```auto
var str:String = "things/stuff/cheese/yum";
var myPattern:RegExp = /e/g;  
trace(str.replace(myPattern, "."));
// returns: "things/stuff/ch..s./yum"

```

… but how do I replace all instances of “/”??

Thanks!
