THE CASE OF WORK WITH REGEX MATCHES
the case
the puzzle is, how to assign a match in regex search to a new variable: to test-path it and eventually create a folder, if the test fails.
solution
Use the -match
with your regex and find the matches in the build-in $matches
hash table!