How can I use regex and the replace function to retrieve:
"?topic=MyCategory"
From these strings:
"?topic=marketing&page=1"
"?topic=Sales&page=2"
"?topic=Recruiting"
"?page=2&topic=recruiting"
But retrieves null or an empty string from these:
"?page=4"
"" (empty string)
I've been able to get to: \?topic=(.*?)& and replace with $1.
And hope it's ok to ask as a follow up question, where can I find a good regex guide/cheatsheet.