Arturo is right -- I don't see how anything is getting
assigned to $project, since the match does not succeed
at all for the initial example.
Trying to match: client.project.subproject where:
- Client and project are manditory. Subproject is optional but, there could be more than one.
- Client, project and subproject could contain, letters, numbers, _, -, or \&
Update:Actually your regex ... works well. Thank you.
Arturo's regex will include both your project and all
sub-projects in $2. If that's okay, fine. If not, do it
like this:
/([^.]+)\.([^.]+)/