Search code examples
regexnose

REGEX --ignore-files does not ignore


I try to ignore files matching this regular expression :

--ignore-files="^load*\.py$"

i want to ignore all files starting with the pattern load+xxx

when i do like that, the files starting with load are also listed. would please help ? Thanks


Solution

  • Your regex will only match files like

    loa.py
    load.py
    loaddddd.py
    

    because you forgot to add the wildcard "dot" (which means "any character"):

    --ignore-files="^load.*\.py$"