How to change title of profile-profile2_machine_name only, but not profile-profile2_machine_name/%user I'd like to change the title of my profile-profile2_machine_name page, but not the page profile-profile2_machine_name/%user page.

This is because I have a settings menu for each user in my profile-profile2_machine_name page and it's a private profile page, while profile-profile2_machine_name/%user is the public profile page.

I've tried many things but when using arg, drupal_get_path_alias() and $_GET['q'], I see that both pages return the same value, which is profile-profile2_machine_name/%user
I think this module will do what you need. I have used it on a few projects. It works. And I think it supports wildcards. Also it says it supports tokens.