I have two lines:
<a href="/kp/pioneer-woman-glasses?cat_id=11327&create_ids=top-rtd-the-pioneer"></a> <a href="/kp/pioneer-woman-glasses?query=glasses&cat_id=11327&create_ids=top-rtd-the-pioneer"></a> Help trim a string through a regular expression to trim /kp/pioneer-woman-glasses to ?cat_id or ?cat_id
Tried ~a href=\"(.+?)(query|cat_id)~im , but it doesn't leave a href