# \[X\] Quote in regular expression

**URL:** https://community.mp3tag.de/t/x-quote-in-regular-expression/18562
**Category:** No Bugs
**Created:** [December 29, 2016, 3:58pm UTC](https://community.mp3tag.de/t/x-quote-in-regular-expression/18562 "2016-12-29T15:58:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![GregTag](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/53a042/32.png) [@GregTag](https://community.mp3tag.de/u/GregTag)
#### Post date: [December 29, 2016, 3:58pm UTC](https://community.mp3tag.de/t/x-quote-in-regular-expression/18562/1 "2016-12-29T15:58:23Z")

</div>

Hello, i searched in the Forum but haven't find this bug.

I have version 2.80 of Mp3tag on Windows 10.

My goal was to replace rnb or r n b or r ' n b by RnB, so i used the following RegExp :  
$regexp(%comment%,r[']{0,2}n[]?b,RnB)  
But i have this error message :  
[SYNTAX ERROR IN FORMATTING STRING]

I think this is really a bug because the search worked with my favorite editor (PSPad) with the same RegExp (r[']{0,2}n[]?🕶.

Thanks for your help guys

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 29, 2016, 4:45pm UTC](https://community.mp3tag.de/t/x-quote-in-regular-expression/18562/2 "2016-12-29T16:45:43Z")

</div>

> [@GregTag](#):
>
> Hello, i searched in the Forum but haven't find this bug.
> 
> I have version 2.80 of Mp3tag on Windows 10.
> 
> My goal was to replace rnb or r n b or r ' n b by RnB, so i used the following RegExp :  
> $regexp(%comment%,r[']{0,2}n?b,RnB)  
> But i have this error message :  
> [SYNTAX ERROR IN FORMATTING STRING]
> 
> I think this is really a bug because the search worked with my favorite editor (PSPad) with the same RegExp (r[']{0,2}n?🕶.
> 
> Thanks for your help guys

See the help on scripting:  
[https://docs.mp3tag.de/scripting](https://docs.mp3tag.de/scripting)

> [@](#):
>
> ' Outputs raw text without parsing. This will output the contained string and ignore all reserved characters. If you want to output this character, please use ''.

So I would say that you have a

> [@](#):
>
> SYNTAX ERROR IN FORMATTING STRING

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 29, 2016, 5:45pm UTC](https://community.mp3tag.de/t/x-quote-in-regular-expression/18562/3 "2016-12-29T17:45:10Z")

</div>

> [@GregTag](#):
>
> ... My goal was to replace rnb or r n b or r ' n b by RnB, so i used the following RegExp ... But i have this error message ...

For example this Formatstring works ...  
$regexp(%TEST%,'(rnb|r n b|r '''' n B)','RnB')

From:  
TEST=rnb or r n b or r ' n b by RnB  
To:  
TEST=RnB or RnB or RnB by RnB

Note the usage of the special single quote character **'** , which is the string delimiter within Mp3tag Scripting Language, ...  
to make it visible it has to be written twice.

DD.20161229.1945.CET

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 28, 2018, 6:50pm UTC](https://community.mp3tag.de/t/x-quote-in-regular-expression/18562/4 "2018-12-28T18:50:55Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
