Move segments regex to constant.