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