# Need help with RegExp

**URL:** https://community.mp3tag.de/t/need-help-with-regexp/11513
**Category:** General Discussion
**Created:** [January 28, 2011, 10:48am UTC](https://community.mp3tag.de/t/need-help-with-regexp/11513 "2011-01-28T10:48:27Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [January 28, 2011, 3:28pm UTC](https://community.mp3tag.de/t/need-help-with-regexp/11513/3 "2011-01-28T15:28:07Z")

</div>

Come on Detlev, you?

> [@DetlevD](#):
>
> $regexp('123','^(.)',)==\> '23'

The first character is repalced by nothing = '1' get deleted

> [@DetlevD](#):
>
> $regexp('123','^(.)','$1')==\> '123'

The first character gets replaced by itself. $1 is what is inside the parenthesis = the first character.

> [@DetlevD](#):
>
> $regexp('123','^(.)','$2')==\> '23'

The first character gets replaced by what is inside the second parenthesis. As there is no second parenthesis, it gets replaced by nothing.

In all three cases just the first character gets replaced, '23' is not included in the regular expression and keeps unchanged.

Glad to help you.

EDIT:  
Why do you always use this apostrophes in your regexps? They are not needed.

---

_[View the full topic](https://community.mp3tag.de/t/need-help-with-regexp/11513)._
