Yes, all longest regex matches in linear time is possible · HackerTrans