Displaying 1 result from an estimated 1 matches for "xxx184_yyy_zzz".
2010 Mar 26
1
regular expression
Hi,
I need to select a substring from the filename of a file in a list.
I can find all the filenames in a directory by
list.files(fn_dir)
Each filename has the format (the following is an example because field
lengths are variable)
XXX184_YYY_ZZZ.dat
XXX: 2 or 3 alphabetic characters
184: 3 numeric characters
...
I'd like to select the substring XXX which has variable length (from each
filename). I saw regular expressions help but still I can't figure out how
to do.
Thanks,
Arnaud Chozo
[[alternative HTML version deleted]]