Question: I can't seem to figure out how to take the year from say `Rogue Assassin 2007` and return:

```
moviename = "Rogue Assassin" 'Whitespace doesn't matter
movieyear = "2007" 'Whitespace doesn't matter

```

However, I can't get it to work. I have been trying the following:

```
    If System.Text.RegularExpressions.Regex.IsMatch(fn, "[0-9][0-9][0-9][0-9]") Then 'Is this right?
        Dim mtemp As String() = fn.Split(" ") 'Movie temp array
        myear(0) = mtemp.Last 'Attempting to set year to the last split
        For Each z As String In mtemp 'Adding the other elements in mtemp together to remake the title
            If z IsNot mtemp.Last Then
                mtitle(0) = z & " " 'Movie title
            Else
                Exit For
            End If
        Next
        ...
    Else
        ...
    End If

```

Any help greatly appreciated!

Answer: 
You could get the name of the variable inside the function ("str"), but you cannot get the name of the variable that was passed into the function unless you pass it in as a second parameter.

It doesn't make sense to get the name of the variable passed to the function because there may not have even been a variable if a literal was passed such as `AddVariable("test variable")`.
You don't need parameter name (possible from reflection) but rather a variable name that has been passed as a parameter. AFAIK, for all practical purpose, this is not possible for the code within the function. 

On the other hand, it's as such possible to do the code analysis of all assemblies loaded in the app-domain and find all invocations to your method and then do the stack-walk to determine possible invocation so that you may able to nail the variable name in the calling method (again if there can be many invocations in calling method, making it difficult to guess the variable name and you have to then rely on IL offset etc) but its just too convoluted.

Perhaps, you can state the reason for such requirements, there can be some alternative. For example, you can get and log stack trace within your method code that can be used for say trouble-shooting.