How to filter tracks with unclosed Parenthesis "(Text ("

Hi, is it possible to create a filter to identify tracks with unclosed Parenthesis?
ex. "(Text ("

Thanks!

Try
%field% HAS "(" AND NOT %field% HAS ")"

This is my fault... :wink:

Actually what I want to filter is "(text (text)"

Then try
title MATCHES "\(.*\(" AND NOT title MATCHES "\).*\)"

This works thank you @ohrenkino.

One more question is there any action which is able to identify and fix these tracks automatically?

I know i could use REPLACE " (" with ") (" if i filter these tracks first. Actually this is WRONG as the result would be ) (Text) (Text) :grimacing:

But what am asking is for an action which will be actually able to do that, Find and Replace at the same time.

(Text (Text) to (Text) (Text)

For a pattern where you assume that you always (if at all) miss the first closing bracket, you could run this Format value action:
$replace($regexp('(Text (Text)','(\(.*)( \(.*\))','$1)$2'),'))',')')
if all the brackets are there, you simply get the already existing string.

"Text" was just an example i was trying to show the format of the tag.

So actually i am trying to find a way to fix these tags independently of the "Text" inside the brackets

I thought it was obvious that you replace the text constant with the field variable for the real expression.

Sorry but my mind doesn't work right now :sweat_smile:

So is there any way to do that independently of the text?

could look like this:
$replace($regexp(%title%,'(\(.*)( \(.*\))','$1)$2'),'))',')')

Thank you once again @ohrenkino.

I tried something similar but it didn't work, as i said it's a tough time for me... :sweat_smile: :sweat_smile: :sweat_smile:

Cheers mate!!!

This filter will return tracks with Open parenthesis even if there are more parenthesis following
ex. "(text (text) (text)" or "(text (text) (text) (text)"

%Title% MATCHES "\(.*\(" AND %Title% MATCHES ".*?\(\w*?[^\)]*?\("

Also these actions would fix the open brackets for the examples above

Format value action:

"(text (text) (text)" to "(text) (text) (text)"

$replace($regexp(%title%,'(\(.*)( \(.*\))(.*\))','$1)$2$3'),'))',')')

"(text (text) (text) (text)" to "(text) (text) (text) (text)"

$replace($regexp(%title%,'(\(.*)( \(.*\))(.*\))(.*\))','$1)$2$3$4'),'))',')')

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