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开发者_如何学JAVA])[- /.](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.
you just need to prepend ^.*\
to your regex.
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>
.
精彩评论