regex - Regular expression to match name value pairs -
i'm trying come regular expression match name=value pairs.
pet=dog (valid) pet=dog&fruit=apple (valid) pet=dog& (invalid - & must followed name value pair) pe t=dog (invalid - space in name) pet=d og (invalid - space in value) pet=dog&&fruit=apple (invalid - 2 & signs) pet=dog=cat&fruit=apple (invalid - 2 = signs before new name value pair) pet==dog (invalid 2 = signs)