Regular Expressions 101

Community Patterns

Match directories from the windows file list

0

Regular Expression
PCRE (PHP <7.3)

/
^([\d\.\/\-]{10,11}) +([\d\:]{5}) +<DIR> +([^ ].*?\\.*?) +([^ ].*?)$
/
gm

Description

Match directories details from the windows directory list using shell command dir /S /Q /T:C

This match return date, time, owner and name of the dirrectories

Submitted by anonymous - 5 years ago