[X] regexp problems

I'm not sure if this is a bug or an error on my part.

$regexp(%artist%,(\sF\w{0,8}[\.gt]\s|\sand\s|\swith\s),' & ',1)

(The actual code is longer but this just the relevant part.)

I use this in the Tag-Filename, to replace variations of 'Featuring', 'And', 'With' in %artist% names with an ampersand.

Notepad++ and all the online regex testers I've tried find the correct matching, except mp3tag 2.77

So All variations of 'Feat.' etc should be ' & '
Here's some output example;

Maze Feat. Frankie Beverly --> Maze Feat. & Beverly.mp3
Maze with Frankie Beverly And More --> Maze & Frankie Beverly & More.mp3
Gene Testing Featuring The Somegthing --> Gene Testing & The Somegthing.mp3
Gene Testing Featg ag Somegthing --> Gene Testing & ag Somegthing.mp3
Gene Testing Feat. The ding Somegthing --> Gene Testing Feat. The ding Somegthing.mp3
Gene Testing Ft. The Somegthing More --> Gene Testing Ft. The Somegthing More.mp3
Gene Testing Feat The Somegthing --> Gene Testing & The Somegthing.mp3
Gene Testing And ding Somegthing --> Gene Testing & ding Somegthing.mp3

In the first line intrestingly 'Frankie' has been replaced.

Excellent program btw.

QUOTE (a23bed @ May 14 2016, 21:49) <{POST_SNAPBACK}>
I'm not sure if this is a bug or an error on my part.
$regexp(%artist%,(\sF\w{0,8}[\.gt]\s|\sand\s|\swith\s),' & ',1)

...


Try:

$regexp(%artist%,'(\sF\w{0,8}[.gt]\s|\sand\s|\swith\s)',' & ',1)

ARTIST <== $regexp(%ARTIST%,'\s(and|with|ft\.?|feat\.?|featuring)\s',' & ',1)

From:
Artist Testing Featuring Someone
Artist Testing Feat. Someone
Artist Testing Feat Someone
Artist Testing Ft. Someone More
Artist Testing Ft Someone More
Artist Testing And Someone
Artist Testing with Someone
Maze with Frankie Beverly And More

To:
Artist Testing & Someone
Artist Testing & Someone
Artist Testing & Someone
Artist Testing & Someone More
Artist Testing & Someone More
Artist Testing & Someone
Artist Testing & Someone
Maze & Frankie Beverly & More

DD.20160514.2308.CEST

Thanks ohrenkino.
Adding the single quotes actually works. Would have never thought of it.

Still on a learning curve, only discovered this fantastic program a few weeks back.

Thanks to all.

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