# regular expressions

**URL:** <https://community.mp3tag.de/t/regular-expressions/15901>\
**Category:** Fehlermeldungen\
**Created:** [July 11, 2014, 12:45pm UTC](https://community.mp3tag.de/t/regular-expressions/15901 "2014-07-11T12:45:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeinzBerecz](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/h/74df32/32.png) [@HeinzBerecz](https://community.mp3tag.de/u/HeinzBerecz)\
**Post date:** [July 11, 2014, 12:45pm UTC](https://community.mp3tag.de/t/regular-expressions/15901/1 "2014-07-11T12:45:44Z")

</div>

ich habe in der Action  
Tag-Feld formatieren "ARTIST": $regexp(%\_folderpath%,^.+?([^\\]+)\W\*$,$1)  
verwendet und bekam die Fehlermeldung Invalid preceding regular expression prior to repetition operator.  
Danach versuchte ich analg zu der regular expression in [/t/967/1](https://community.mp3tag.de/t/967/1)  
$regexp(%\_folderpath%,^.+?([a-z0-9]{2,4})\W\*$,$1)  
und bekam folgende Fehlermeldung:  
REGEXP ERROR: Regular expression  
Invalid preceding regular expression prior to repetition operator. The error occurred while parsing the regular expression: '^.+?({2,4}\>\>\>HERE\>\>\>)\W\*$'.  
Zuletzt versuchte ich  
$regexp(%\_folderpath%,^.+?(\w+)\W\*$,$1)  
Damit hatte ich endlich Erfolg, allerdings mit dem Nachteil, dass Umlaute und Leerzeichen nicht vorkommen dürfen.  
Offenbar ignoriert das Programm Ausdrücke in eckigen Klammern.

[Mp3tagError.log](https://community.mp3tag.de/uploads/default/original/2X/5/59ffc06db4890b04622af7a9121dc45ef6f94931.log) (765 Bytes)

---

<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:** [July 11, 2014, 3:38pm UTC](https://community.mp3tag.de/t/regular-expressions/15901/2 "2014-07-11T15:38:28Z")

</div>

> [@HeinzBerecz](#):
>
> ich habe in der Action  
> Tag-Feld formatieren "ARTIST": $regexp(%\_folderpath%,^.+?([^\\]+)\W\*$,$1)...  
> Offenbar ignoriert das Programm Ausdrücke in eckigen Klammern.

Wenn du statt dessen  
$regexp(%\_folderpath%,'^.+?([^\\]+)\W\*$',$1)  
(2 zusätzliche Hochkommata) verwendest, könnte es gehen.
