Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: greedy search in "automaticallt fill values..." (Read 1030 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

greedy search in "automaticallt fill values..."

Is it possible to do a kind of greedy matching in foobar2000?
In the example below I would like to extract what is in the last parentheses but it matches the first one and ignores the rest.
Some regex would be great...

X

Re: greedy search in "automaticallt fill values..."

Reply #1
(Hi!)
Good idea, the current behavior is indeed wrong, noted.
Microsoft Windows: We can't script here, this is bat country.

Re: greedy search in "automaticallt fill values..."

Reply #2
Since there is no solution so far, I figured you could use two steps -

1) 'Automatically Fill Values...' as you were using -

Code: [Select]
%temp1% (%temp2%) (%temp2%)

That should fill in %temp2% correctly (why not use %movement% tag?), except the first set of tracks will have an extra ')' at the end. Which you could then remove with -

2) right-click TEMP2 field > 'Format From Other Fields...' and enter -

Code: [Select]
$if($strcmp($right(%temp2%,1),')'),$cut(%temp2%,$sub($len(%temp2%),1)),[%temp2%])

^ Possibly an overly long string for the job but you get the idea - and check everything looks correct before hitting Apply to write the tags.

Cheers

 

Re: greedy search in "automaticallt fill values..."

Reply #3
Changed in beta 17.
Microsoft Windows: We can't script here, this is bat country.