Kodi Community Forum

Full Version: Yet Another Stacking Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i know there are quite a few of these, so i apologize in advance if this is posted incorrectly.

i've been trying to create a custom regexp using the following mask:

"movie [x-y].avi" ex. "movie [1-2].avi"
"movie [x-y].avi" ex. "movie [2-2].avi"

where "x" is the part number and "y" is the total amount of parts.
so far i've managed:
Quote:<regexp>\[([0-9])\-([0-9])\]\....$</regexp>
which doesn't do a whole lot. any help would be greatly appreciated.

thank you,
raharazod
you need to only match the first part of whats in the brackets. try this:

<regexp>(.*)[ ]*\[([0-9])</regexp>

(.*) = "movie'
[ ]* = zero or more spaces
\[ = backet
([0-9]) = volume identifier
ah ha! works perfectly. thank you, you are a god among men.