Replace ugly regexp by startsWith