I am trying to extract a substring 022014-101from a string str1:
str1 = <C:\User\Test\xyz\022014-101\more\stuff\022014\1>
I usually use split("\\")and split the line after \to get the [-5]'th element , but this is bad if I have more subfolders ... As you can see the first 6 digits 022014-101represent the date plus some characters (-101 in this case). I think I should use regex, but how can I match 6 digits and get everything until it happens \. I don't have much experience with regex, does anyone know a solution? Thanks.
Cecil source
share