photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Darius1968 on June 26, 2022, 06:42:50 AM

Title: Data Driven Category Replace Mask (With Commas)
Post by: Darius1968 on June 26, 2022, 06:42:50 AM
In a data driven category without a replace mask:  Season 1, Episode 8 enumerates as follows: 
Season 1,
-----Episode 8
... And, with this replace mask:  Episode [0-9]?[0-9]{1}[a-e]?.*,, the output is: 
Season 1,

However, I'm trying to suppress the comma, with this replace mask:  (~\, )Episode [0-9]?[0-9]{1}[a-e]?.*,, which doesn't work.  I figure it's because the comma is pivotal in the replace mask expression.  Is there any way to escape it? 
Title: Re: Data Driven Category Replace Mask (With Commas)
Post by: Mario on June 26, 2022, 09:35:04 AM
What are you trying to do? Do you have configured the , to be a hierarchy separator?
Title: Re: Data Driven Category Replace Mask (With Commas)
Post by: Darius1968 on June 26, 2022, 10:00:44 AM
No, I do not have the comma as a hierarchy separator. 

I have a collection of video files with multi-lined titles like this: 
Lost In Space
Season 2, Episode 20
The Space Vikings

My goal is to have the data driven category output as follows: 
Lost In Space
---Season 2
However, the best I can do right now - with Episode [0-9]?[0-9]{1}[a-e]?.*, - is:
Lost In Space
---Season 2,
So, I have effectively created a two-level category that puts all of the 20+ episodes of Season 2 under one node.  Great!  But how can I get rid of the comma in the category display? 
Title: Re: Data Driven Category Replace Mask (With Commas)
Post by: Mario on June 26, 2022, 10:22:23 AM
Not everything is doable.
Maybe remove the commas from the titles first (MD Mechanic) and then produce your category.
Title: Re: Data Driven Category Replace Mask (With Commas)
Post by: Darius1968 on June 26, 2022, 06:24:51 PM
Okay.  I just tried using MD Mechanic, with Regular Expression Replace>Replace:Season [1-9], With:Season [1-9]

The result: 

Lost In Space
Season 2, Episode 20
The Space Vikings
...becomes...
Lost In Space
Season [1-9] Episode 20
The Space Vikings

So, what is wrong with the syntax of my expression? 
Title: Re: Data Driven Category Replace Mask (With Commas)
Post by: Mario on June 26, 2022, 06:59:10 PM
I would just have replaced the , with 'nothing'.