Hi,
I need some help with a regular expression. I am not a RegExp guy at all, and have no other way around the problem as the tool written uses regexp all over the place. If there was a way round I would take it.
That said.
How *** **** would you get the first directory out of the following string using regexp
C:\First directory\Second directory\Third directory\filename
^*\\*.*\\
returns me
'C:\First directory\'
Which is close but I just want
'First directory'
Any help greatly appreciated.
Thanks
I need some help with a regular expression. I am not a RegExp guy at all, and have no other way around the problem as the tool written uses regexp all over the place. If there was a way round I would take it.
That said.
How *** **** would you get the first directory out of the following string using regexp
C:\First directory\Second directory\Third directory\filename
^*\\*.*\\
returns me
'C:\First directory\'
Which is close but I just want
'First directory'
Any help greatly appreciated.
Thanks
Comment