Here is my string:
/index.php?option=com_podstrony&id=1
and I want to get from it “com_podstrony”
here is my regexp: /^\/*index.php\?option=(.*)+&.*$/
but result is wrong:
option=com_podstrony&id=1
I’m using PHP preg_replace.
Anyone can help me?
You don’t need to use a regex…
CodePad.
But if you wanted to use a regex for some reason…
CodePad.