Pattern not found

All about user-defined episode / movie / file name format expressions
Post Reply
NPHaus
Posts: 14
Joined: 12 Sep 2013, 23:32

Pattern not found

Post by NPHaus »

Having the following code:

{(media.title).matchAll(/One|Two|Three|Four/).unique()}


I make as if none of the elements does not leave anything, I now pulls a [java.lang.Exception: Pattern not found]
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Pattern not found

Post by rednoah »

Code: Select all

{"One Two Three".matchAll(/One|Two|Three|Four/).unique()}
Yep. Works.

Code: Select all

{"Not A Number".matchAll(/One|Two|Three|Four/).unique()}
Yep. Pattern not found. Makes sense.


So what's the value of media.title then? Whatever it is, I know for a fact that it doesn't contain the One|Two|Three|Four pattern. :P

PS: Did you know that media.title is a MediaInfo property based on the tags in the file content, which may or may not be set? :idea:
:idea: Please read the FAQ and How to Request Help.
NPHaus
Posts: 14
Joined: 12 Sep 2013, 23:32

Re: Pattern not found

Post by NPHaus »

Sorry but not for numbers, is for trackers


{(media.title).matchAll(/GrupoHDS|HDTeam|Hechede.me|HDCity/).unique()}

sorry thought I would serve the example with numbers
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Pattern not found

Post by rednoah »

"Pattern not found" is what you get when {media.title} doesn't contain your pattern. That's how it should be.
:idea: Please read the FAQ and How to Request Help.
NPHaus
Posts: 14
Joined: 12 Sep 2013, 23:32

Re: Pattern not found

Post by NPHaus »

Yes, I understand, what I want is that when the pattern does not exist not put anything
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Pattern not found

Post by rednoah »

That's literally what's happening.

@see viewtopic.php?f=5&t=1895
:idea: Please read the FAQ and How to Request Help.
Post Reply