Skip to content
Prev 43372 / 398506 Next

Doubt about pattern

Hoi Marcelo,

--On donderdag 29 januari 2004 11:33 -0300 Marcelo Luiz de Laia
<mlaia at fcav.unesp.br> wrote:
That's because your pattern is a regular expression and not a Windows/DOS 
wildcard. You'll need something like

files <- dir(pattern="\.sens$")

\. matches the dot itself (without the slash it's a wildcard for any 
character) and the dollar sign $ matches the end of the filename. So this 
way you'll get every file that has 'sens' as its extension


regards,
Paul