Hi, I have this path that i need only the file name and extension at the end of the path.
example:
\\dct02\abc\Bennett_1_050823\C_Drive1\Documents and Settings\Administrator\NTUSER.DAT
outcome should be...
NTUSER.DAT
Thanks
help with regular expression
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Is each path the only text on a line? If so, then this does it:
The regular expression recogniser will find a match that starts as far to the left as possible (i.e., at the beginning of the line) and that is as long as possible (i.e., up to and including the last backslash).Find what: .*\\
Replace with: [Nothing]
[X] Regular expression