I’m new with regular expressions. I need to extract the path from the following lines:
XXXX c:\mypath1\test
YYYYYYY c:\this is other path\longer
ZZ c:\mypath3\file.txt
I need to implement a method that return the path of a given line. The first column is a word with 1 or more characters, never is empty, the second column is the path. The separator could be 1 or more spaces, or one or more tabs, or both.
It sounds to me like you just want
(This is assuming that the first column never contains spaces or tabs.)
EDIT: As a regular expression you can probably just do:
Sample code: