Regular expressions (1 Viewer)

KayJay

Portal Member
October 6, 2008
11
0
Aalborg
Home Country
Denmark Denmark
I'm not very good with regular expressions but I would like to filter out my comments in my film titles.
Eg. if a DVD movie is missing the menu structure, I name it "Some Movie [m]", if it's missing extras, I add [x] or both, it's [mx] and so on for missing commentaries and whatever else might be of notice with that particular movie.

I want the title parser to ignore the square brackets and everything inside them. In Advanced Setting, there is a filter string set up as ((720p|1080p|1080i|DirCut|DVDRip|DVDScreener|DVDScr|AVCHD|WMV|NTSC|MPEG|DSR|R5|DVDR|DTS|AC3|Bluray|Blu-ray|HDTV|PDTV|HDDVD|XviD|DiVX|x264|dxva)[-]?.*?$) and i would like to add my criteria.
I know [] are used as an operator. I tried changing the last part to ... |dxva|\[*\])[-]?.*?$) but without any success.

Anyone familiar enough with regexps to help me out?
 

fforde

Community Plugin Dev
June 7, 2007
2,667
1,702
42
Texas
Home Country
United States of America United States of America
Try this:

((720p|1080p|1080i|DirCut|DVDRip|DVDScreener|DVDScr|AVCHD|WMV|NTSC|MPEG|DSR|R5|DVDR|DTS|AC3|Bluray|Blu-ray|HDTV|PDTV|HDDVD|XviD|DiVX|x264|dxva|\[\D*\])[-]?.*?$)
 

KayJay

Portal Member
October 6, 2008
11
0
Aalborg
Home Country
Denmark Denmark
Thanks, that worked beautifully. Suddenly all my movies are found automatically.

I don't know what the \D operand is, but it did the trick.
 

Users who are viewing this thread

Top Bottom