How can I distinguish dynamic pages on a hook_menu? function mymodule_menu_local_tasks(&amp;$variables) {
   if ( request_path == 'yadda') :
   ....
}


I can do that.. but the problem is I want to include this for the tabs on user/$id/edit and I'd rather not do regex or check the beginning and end of the string...

Is there some way I can pull a variable that relates to that specific page type?
You can tell if you're on a node page with menu_get_object(), but other than that it's difficult. menu_get_object() can return other objects than a node, but you need to know the type of entity before you call it (not much help in your situation). There's no generic solution that I know of in Drupal 7.

There is the drupal_match_path() function though, which you can use with wildcards, e.g.

if (drupal_match_path(request_path(), 'user/*/edit')) {
  // On a user edit page
}