 
         If (InStr(mapstring_formated, "maps") and InStr(mapstring_formated, "bsp"))
         {
-            RegExMatch(mapstring_formated, "(?<=maps[\/\\]).+(?=\.bsp)", Mapname) ;regex lookahead and lookbehind
+            RegExMatch(mapstring_formated, "(?<=maps[\/\\]).+(?=\.bsp)", Mapname) ;RegEx lookahead and lookbehind
             Mapname := Format("{1:s}", Mapname)
             If (InStr(Mapname, "/") or InStr(Mapname, "\"))
             {

logfile_counter := 1
GuiControl, Disable, Start
GuiControl, Disable, RenamingMaskNumber
GuiControlGet, RenamingMaskNumber
FileSelectFolder, folder_demofiles,, 0, Please select your folder where your demofiles are. `nAll files with the ending *.dem will be renamed.
if ErrorLevel=0
{

}

;############################### Functions ###############################
HasVal(haystack, needle) {                                              ;HasVal function from https://autohotkey.com/boards/viewtopic.php?p=109617#p109617
    for index, value in haystack
        if (value = needle)
            return index
    if !(IsObject(haystack))
        throw Exception("Bad haystack!", -1, haystack)
    return 0
}

ParsingDemofiles(RenamingMaskNumber, counter_files_quotient)
{
    Loop, Files, *.dem
