Modifying regex to pass tests