Using regular expression match this pattern - 5h to 6h,4am to 9am,3pm to 8pm,4h to 9pm......
and I have already regular expression for - 5h, 4pm, 5am......
and I want to use this regular expression for match 4am to 9am.
like var reg_expr = (/(\d{1,2}?h$)|(\d{1,2}h(?=\s+))|(\d{1,2}:\d{2}([ap]m)?$)|(\d{1,2}:\d{2}([ap]m)(?=\s+))|(\d{1,2}:\d{2}(?=\s+))|(\d{1,2}([ap]m)?$)|(\d{1,2}([ap]m)(?=\s+))/gi)
this reg_expr matches pattern like 4h,5pm,8am.....
and this variable uses in match 4am to 9am,
like var reg_data = ((reg_expr)(/\s(to)(?=\s)/gi)(reg_expr))...
Is it possible.??? if yes then how???