Skip to content
Prev 343172 / 398513 Next

regex pattern assistance

On Aug 15, 2014, at 11:18 AM, Tom Wright <tom at maladmin.com> wrote:

            
Is the desired substring always in the same relative position in the path?

If so:
[[1]]
[1] ""        "mnt"     "AO"      "AO Data" "S01-012" "120824"
[1] "S01-012"



Alternatively, again, presuming the same position:
[1] "S01-012"


You don't need all of the double backslashes in your regex above. The '/' character is not a special regex character, whereas '\' is and needs to be escaped.

Regards,

Marc Schwartz