Regular Expressions 101

Community Patterns

Community Library Entry

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 - 6 years ago