old php, because regex data structures are always great