java - extract start and end date with regex group -


i have service period mentioned

may 01-15 

and need extract start , end date as

group 1 : may 01 group 2 : may 15 

is possible???

it possible.

this expression

@(jan|feb|may) (\d{1,2})-(\d{1,2})@is 

gives following array

array (     [0] => may 01-15     [1] => may     [2] => 01     [3] => 15 ) 

you should expand first parenthesis months need/want.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -