For the first one:
Match:
([0-9][0-9])\.([0-9][0-9])\.([0-9][0-9][0-9][0-9])\.([0-9][0-9])\.([0-9][0-9])
That's pretty specific/verbose, but is also very simple.
Replace:
\1_\2_\3 , \4_\5
But, that gives you 05 instead of 5. (I'm not feeling all that well, so maybe someone else can fix up a backreference and conditional there.)
Not sure about the second as for what everything could be, but you need a conditional for the month, and I'm a bit under the weather to remember and look it up right now. Maybe I can post back later.