I want to parse the 2 digits in the middle from a date in dd/mm/yy format but also allowing single digits for day and month.
dd/mm/yy
This is what I came up with
Unless there's a specific reason for using the lookbehind which isn't noted in the question, how about simply matching the whole thing and only capturing the bit you're interested in instead?
JavaScript example:
>>> /^\d{1,2}\/(\d{1,2})\/\d{1,2}$/.exec("12/12/12")[1] "12"