I have some data's like 2014-06-11T22:22:17
which i am matching using regex ([\d-])+T([\d:])+ in two different part by separating date and time like
2014-06-11 and 22:22:17 so i have created two groups
but when i am extracting the data like as below
Date =m.group(1); it extract only digit "1" in Date String, why is it not extracting the entire group which is 2014-06-11?
[\d-]+Repeating the group will give you the value of the last iteration, and findall will return the group which will then contain a single value.(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})