RayT
asked on
Regex Problem
How can I use Regex to parse the following string to return "Shyne Family.jpg"?
"-rwxr-xr-x 1 500 15000 62483 Sep 22 17:56 Shyne Family.jpg"
"-rwxr-xr-x 1 500 15000 62483 Sep 22 17:56 Shyne Family.jpg"
ASKER
I need to do this from a Visual Basic application.
ASKER
There will be one or more strings like this. I need to used something that can be implemented on each string.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
Here's my code:
Dim match As Match = Regex.Match(tempValue, "^(?:.+?\s+){8}(.+?)$")
dim group As object = match.Groups.Item(1)
Here's my code:
Dim match As Match = Regex.Match(tempValue, "^(?:.+?\s+){8}(.+?)$")
dim group As object = match.Groups.Item(1)
.*?\d{2}:\d{2}\w*(.*)
Will focus on the time string as marker and store the wanted string (everything behind that) in an numbered capture ("$1" in a replacement expression).
I use the tool Expresso (free) for such desingnig tasks ...
Will focus on the time string as marker and store the wanted string (everything behind that) in an numbered capture ("$1" in a replacement expression).
I use the tool Expresso (free) for such desingnig tasks ...
Open in new window