Page 1 of 1

Pattern not found

Posted: 14 Oct 2015, 18:10
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]

Re: Pattern not found

Posted: 14 Oct 2015, 18:17
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:

Re: Pattern not found

Posted: 14 Oct 2015, 18:30
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

Re: Pattern not found

Posted: 14 Oct 2015, 18:46
by rednoah
"Pattern not found" is what you get when {media.title} doesn't contain your pattern. That's how it should be.

Re: Pattern not found

Posted: 14 Oct 2015, 21:55
by NPHaus
Yes, I understand, what I want is that when the pattern does not exist not put anything

Re: Pattern not found

Posted: 15 Oct 2015, 04:04
by rednoah
That's literally what's happening.

@see viewtopic.php?f=5&t=1895