Divide it mentally in three groups with brackets. First group check domains >= level 2. Second group check first level domain. Third group check the local path. Lastly an optional slash.

In this way the string to pass must be a little structured.