Anonymous Board owner 11/18/2019 (Mon) 04:53:42 Id: 8b213f No.324 del
>>318
Hey, yeah, regex is a pain in the ass at the best of times, and the way I apply some of it isn't totally standard.

Just a quick thing, if it happens to help, hydrus is in python rather than PHP. I'm not sure there will be any big differences, but maybe in some edge cases.

I think in my regex parsing there, I get every matching string, rather than just the first, as perhaps that online one is doing. If you want day and month with those paths, I'd probably go for:

month - (?<=\\\d{4}\-)\d+
day - (?<=\-\d\d\-)\d+


I am making sure the look-behind matches the right number of numbers (\d) in order to capture the second or third group in the yyyy-mm-dd set.