Working regex parsing