Catch failures in regexp on chunks