Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+(.*)
/
g

Description

Parse just the filename from ls -a output on Linux.

Submitted by Brian Hannan - 8 years ago