tags:

views:

50

answers:

2
TEXT: R:\Everybody\OlegB\DiskCleaner\1\NewsFeed\Regional\Bray People_2010-04-14_v3.zip

REGEX: (?<titleid>.*)_(?<issuedate>(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01]))_v(?<layoutver>[0-9]*)

I need apply REGEX to the following part of TEXT:

Bray People_2010-04-14_v3.zip

How can I filter out all text before last occurrence of slash and apply expression to the reminded part.

+2  A: 

you just need to prepend ^.*\ to your regex.

SilentGhost
Prepending .*\ works fine too.
StreamT
A: 

Use

(?<titleid>[^\\_]*)_(?<issuedate>(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01]))_v(?<layoutver>[0-9]*)

This will avoid matching backslashes and underscores for the <titleid>.

Tim Pietzcker