- March 17, 2008
- 1,353
- 306
- Home Country
-
Netherlands
Hi all,
Wonder if someone can help me out solving this, I totally suck @ regex!
I need a parsing expresion that covers the following scenario (as an example I picked one tvserie path);
\Fawlty Towers\Season 01\1-A touch of Class.avi
That's the general naming of my filenames. The dash between episode and title (as in respectively "1" and "A touch of class") can have spaces around it. Besides that I need to cover my double episode in one file situation which I have in "01&02-title" format. Again by this example spaces around the & sign are optional as well as around the dash.
The last situation I need to handle is the lack off the title name, then the files look like "01.ext" or "1.ext" (usualy the former and 01&02.ext ofcourse).
This is my sorry try @ getting there;
\\(?<series>)\\Season (?<season>[\d]+)\\((?<episode>[\d]+)) ([\s]*&[\s]*((?<episode2>[\d]+))? ([\s]*-[\s]*))((?<title>)\.(?<ext>)$
Based upon this example
Wonder if someone can help me out solving this, I totally suck @ regex!
I need a parsing expresion that covers the following scenario (as an example I picked one tvserie path);
\Fawlty Towers\Season 01\1-A touch of Class.avi
That's the general naming of my filenames. The dash between episode and title (as in respectively "1" and "A touch of class") can have spaces around it. Besides that I need to cover my double episode in one file situation which I have in "01&02-title" format. Again by this example spaces around the & sign are optional as well as around the dash.
The last situation I need to handle is the lack off the title name, then the files look like "01.ext" or "1.ext" (usualy the former and 01&02.ext ofcourse).
This is my sorry try @ getting there;
\\(?<series>)\\Season (?<season>[\d]+)\\((?<episode>[\d]+)) ([\s]*&[\s]*((?<episode2>[\d]+))? ([\s]*-[\s]*))((?<title>)\.(?<ext>)$
Based upon this example