English > Support

File Scanner and Regular Expressions

<< < (9/18) > >>

nostra:
1. You can't get category, quality or custom fields using regexps.
2. "Original Title" ("Year") should be processed correctly with default regexps.
3. for "English Title" - "Original Title" ("Year") ("Category") ["Source"] you need:

--- Code: ---(?i)^.*\\(?P<title>.*) - (?P<origtitle>.*) \((?P<year>[0-9]{4})\).*
--- End code ---

buah:
Tnx nostra, it works great!!!

Hoping that I'm not taking you too much time, just two more things.

1. Is it possible to get ID from the name, cause actually I forgot that the full syntax of my folders (and videos) is:
"ID" - "English Title" - "Original Title" ("Year") ("Category") ["Source"]

2. Is it possible and how to replace "^" with "?", and "--" with ":" wherever it occurs in the name?

I really feel ungrateful now, because I forgot to ask this in my previous post. I guess it happened cause I've been working during weekend as well, and making a lot of reports.

Cheers

nostra:

--- Quote ---1. Is it possible to get ID from the name, cause actually I forgot that the full syntax of my folders (and videos) is:
"ID" - "English Title" - "Original Title" ("Year") ("Category") ["Source"]
--- End quote ---

No. Only these fields: title, original title, year, season number, episode number, episode title


--- Quote ---2. Is it possible and how to replace "^" with "?", and "--" with ":" wherever it occurs in the name?
--- End quote ---

Yes, you have a "Find and replace" table at the bottom of File scanner preferences for this.
Do not forget to escape ? and ^ with \.

buah:
Tnx once again. It all works like a charm.

buah:
OK, my head exploded.

1. I want to match \d{5}\s-\s ("04523 - ", for instance) which is at the start of the string and not to capture it, but to capture everything after that match, which is what nostra gave me two posts above. Example:

05013 - Antichrist (2009)

I want to capture only <title> and <year>. First 8 characters are always \d{5}\s-\s

2. Nostra, it seems that your regex can't capture movie [REC] (2007)?

Please!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version