English > Support
File Scanner and Regular Expressions
buah:
Oh, I thought NMM also would give me the same result as scanner.
As I said earlier, scanner works perfectly. Thank you and sorry for wasting your time, honestly.
So, this is regexp that works for my movie naming convention
"ID" - "Title" - "Original Title" "(Year)" "Whatever-but-to-be-ignored"
--- Quote ---(?i)^.*\\.*- (?P<title>.*) - (?P<origtitle>.*) \((?P<year>[0-9]{4})\).*
--- End quote ---
[attachment deleted by admin]
STEPHAN:
Hi,
I am using OTR (OnlineTvRecorder.com). This is a website that lets you record and download German TV. I live in the US ....
Personal Video Database was recommended in their forum.
My (their) film files are in this format:
Gangs_of_New_York_08.02.23_20-15_pro7_180_TVOON_DE.mpg.HQ.cut.avi
Der_Dummschwaetzer_10.09.26_20-15_rtl2_105_TVOON_DE.mpg.HQ.cut.avi
Krieg_der_Welten_08.02.24_20-15_pro7_135_TVOON_DE.mpg.HQ.cut.avi
Der_Schakal_08.02.08_20-15_rtl2_135_TVOON_DE.mpg.HQ.cut.avi
Projekt_Peacemaker_08.02.01_20-15_pro7_135_TVOON_DE.mpg.HQ.cut.avi
King_Tut_Der_Fluch_des_Pharao_08.02.02_20-15_pro7_180_TVOON_DE.mpg.HQ.cut.avi
That’s Title, Date it was send, Time it was send, TV Station, Length of the whole broadcast (including advertising) "TVOON" , quality of the recording, if advertising was cut out etc.
So, only the Title really matters. If I manually search using the title everything works okay (using German Film Databases of cause). Now I am trying to get the Regular Expression for this created, but I don't know anything about it and its hard to get started for me – even with the website recommended here.
Any help would be greatly appreciated.
Thanks
Stephan
rick.ca:
Welcome, Stephan.
(?i)^.*\\(?P<title>.*)(_[0-9]{2}\.[0-9]{2}\.[0-9]{2}_).*\..{3,4}
will handle this pattern. This illustrates what is probably the most common regex technique in this application. The fixed pattern of the date is recognized by (_[0-9]{2}\.[0-9]{2}\.[0-9]{2}_). Having this, the title is always whatever is between the last "\" and the date. The "_" in the title are replaced by " " by a Find & Replace rule. Whatever is after the date can be ignored. The same technique can be used where a title is followed by a fixed pattern of year or season and episode number(s). The .*\..{3,4} after the date means "any number of any character until a '.' followed by 3 or 4 characters." That could probably just as well be .*\.avi, but this will work for any file type.
nostra:
Do not know if you already noticed it, but I have uploaded an app to help writing regular expressions for PVD:
http://www.videodb.info/bin/pvdrt.zip
You still need to write the expression , but it is much easier to test it with this app.
rick.ca:
--- Quote ---but it is much easier to test it with this app.
--- End quote ---
Indeed, it is. I suggest you add a button to Preferences>File scanner to call this. It's perfect for those of us who do everything by trial & error. ;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version