Is there any way to expand multiple parameters?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
santilli
Posts: 26
Joined: Tue Apr 30, 2024 7:05 am

Is there any way to expand multiple parameters?

Post by santilli »

I was thinking of creating a filter to help me find videos with specific tags. In my use case, a tag is any whole word inside parenthesis.
For example "File name (tag1 tag2 tag3).mp4"

For now, I use:
video: ( $param: )

What it actually does is look for video files containing both "(" and ")" as well as the actual parameters. Works most of the time, but if a file contains the parameters outside the parenthesis, it matches as well.

I had come up with a regex template that only matches words inside the parenthesis, which caused a new problem:
i cannot search for multiple tags, unless they occur in the exact order of the parameters.

so for instance, if i search for "tag1 tag2 tag3" I will only get results that match that exact order, because it is one single parameter. as far as i know, there is no way of treating each tag as a single parameter and still have the search limited to the parenthesis boundaries.

if you know any way to achieve this behavior, or if you think of something better, please let me know.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Is there any way to expand multiple parameters?

Post by void »

Please try the following search:

video: regex:\([^)]*#<SUBSTITUTE:#param:#,:,#,:[^)]*\) regex:\([^)]*#>:[^)]*\)


Separate your tags in your macro with
,


For example, if your macro name is vt, call:
vt:1080p,60fps,AAC


which expands to:
video: regex:\([^)]*1080p[^)]*\) regex:\([^)]*60fps[^)]*\) regex:\([^)]*AAC[^)]*\)
santilli
Posts: 26
Joined: Tue Apr 30, 2024 7:05 am

Re: Is there any way to expand multiple parameters?

Post by santilli »

huge thanks, it has indeed worked and does exactly what i need!
hopefully one day i will understand what you just did :geek:
Post Reply