<?php
function blegh ($subject) {
  // I know this pattern doesn't exactly work
  $pattern = '/(.*).php\?action=([^&].*)/';
  preg_match ($pattern, $subject, $matches);
  return $matches;
}

blegh ('somePage.php?action=doSomething&id=');
?>

Ok, the important parts that I need to obtain from this are:

somePage
doSomething

How can you modify the pattern above to grab the action appropriately? Sorry, my regex is a lil rusty!

Thanks in advance,
~Phil

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to