I want to replace a 2 characters in a string.I dont know how to use `preg_replace()`.

```
http://123-test.ab.name.com (or) http://13_test.ab.name.com (or) http://13.test.ab.name.com

```

In the above url i want to replace only ab with bc. How can i use `preg_replace()` for this situation?