Yes, it needs it. $regmlex() has three parameters, two of which are optional, the first and the last. If you only use two parameters, it cannot know which two you've specified.