So yea, I suck with regular expressions. Needs to be done with php. Thanks.
I need to be able to pull out “xx” (will always be 2 lowercase alphabetic chars) and “a12” (can be anything but will always be .php).
String:
http://foo.bar.com/some_directory/xx/a12.php?whatever=youwant
Since he’s looking for a PHP solution and not just PCRE, I think something like this might be a bit more comprehensive: