Page 1 of 1

help with regular expression

Posted: Tue Nov 01, 2005 7:44 pm
by dabombst
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

Posted: Tue Nov 01, 2005 8:23 pm
by ben_josephs
Is each path the only text on a line? If so, then this does it:
Find what: .*\\
Replace with: [Nothing]

[X] Regular expression
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).